-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.test.yaml
55 lines (54 loc) · 1.62 KB
/
docker-compose.test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
version: "3"
services:
postgres:
image: postgres
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
traefik:
image: "traefik:v2.3"
container_name: "traefik"
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
backend:
image: "pennlabs/penn-clubs-backend:latest"
environment:
DJANGO_SETTINGS_MODULE: pennclubs.settings.ci
DATABASE_URL: "postgres://postgres:postgres@postgres:5432/postgres"
healthcheck:
test: python manage.py migrate --check
interval: 10s
timeout: 5s
retries: 5
depends_on:
- postgres
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend.rule=Host(`traefik`) && PathPrefix(`/api`)"
- "traefik.http.routers.backend.entrypoints=web"
- "traefik.http.services.backend.loadbalancer.server.port=80"
frontend:
image: "pennlabs/penn-clubs-frontend:latest"
command: ["yarn", "start"]
environment:
DOMAIN: http://traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.rule=Host(`traefik`)"
- "traefik.http.routers.frontend.entrypoints=web"
- "traefik.http.services.frontend.loadbalancer.server.port=3000"
volumes:
- type: bind
source: /tmp/test-results
target: /app/test-results
# https://github.com/cypress-io/cypress/issues/350
ipc: host