Files
maintenance_page/docker-compose.test.yml
T

44 lines
1.1 KiB
YAML
Raw Normal View History

# Stack de tests d'intégration. Le réseau est fixé pour que l'IP du
# conteneur 'client' soit déterministe (172.28.5.50), ce qui permet
# de jouer scénarios whitelist/blacklist relatifs à cette IP connue.
services:
proxy:
build: .
image: maintenance-proxy:test
networks:
testnet:
ipv4_address: 172.28.5.10
environment:
MAINTENANCE_MODE: "${MAINTENANCE_MODE:-whitelist}"
MAINTENANCE_IP_LIST: "${MAINTENANCE_IP_LIST:-172.28.5.50}"
UPSTREAM_HOST: "upstream:80"
LISTEN_PORT: "8080"
SERVER_NAME: "_"
depends_on:
- upstream
upstream:
image: nginx:stable-alpine
networks:
testnet:
ipv4_address: 172.28.5.20
volumes:
- ./tests/fixtures/upstream:/usr/share/nginx/html:ro
client:
image: alpine:3
networks:
testnet:
ipv4_address: 172.28.5.50
entrypoint: ["/bin/sh", "-c", "apk add --no-cache curl >/dev/null && sleep infinity"]
depends_on:
- proxy
networks:
testnet:
driver: bridge
ipam:
config:
- subnet: 172.28.5.0/24