forked from webappio/livechat-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
76 lines (69 loc) · 1.81 KB
/
docker-compose.yml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
version: "3.8"
services:
postgresql:
image: postgres:11.4-alpine
container_name: "postgresql"
expose:
- 5432
volumes:
- "/livechat-data/postgresql:/var/lib/postgresql/data/pgdata"
environment:
- "PGDATA=/var/lib/postgresql/data/pgdata"
- "POSTGRES_USER=postgresql"
- "POSTGRES_PASSWORD=postgresql"
- "POSTGRES_DB=livechat-example"
restart: on-failure
migrate:
image: migrate:latest
container_name: "migrate"
build: ./services/migrate
stop_grace_period: "1s"
command: ["up"]
restart: on-failure
web:
image: web:latest
container_name: "web"
build: ./services/web
stop_grace_period: "1s"
labels:
- "traefik.enable=true"
- "traefik.http.services.web.loadbalancer.server.port=80"
- "traefik.http.routers.web.rule=PathPrefix(`/`)"
- "traefik.http.routers.web.entrypoints=web"
expose:
- 80
restart: on-failure
api:
image: api:latest
container_name: "api"
build: ./services/api
labels:
- "traefik.enable=true"
- "traefik.http.services.api.loadbalancer.server.port=80"
- "traefik.http.routers.api.rule=PathPrefix(`/api/`)"
- "traefik.http.routers.api.entrypoints=web"
expose:
- 80
restart: on-failure
volumes:
- "/livechat-data/api/secret:/secret"
traefik:
image: "traefik:v2.3"
container_name: "traefik"
command:
- "--accesslog"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "8000:80"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
cypress:
image: cypress:latest
ipc: host
build: ./services/cypress
ports:
- "9000:80"
volumes:
- "./services/cypress/tests:/app/tests:ro"