-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
98 lines (86 loc) · 2.31 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
version: '3.7'
networks:
net:
volumes:
postgres:
services:
traefik:
image: traefik:v2.0
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./docker-utils/traefik/traefik.yml:/etc/traefik/traefik.yml
networks:
- net
ports:
- 80:80
- 8080:8080
postgres:
image: postgres:${POSTGRES_VERSION}
restart: unless-stopped
shm_size: 4g
ports:
- 5432:5432
volumes:
- postgres:/var/lib/postgresql/data
networks:
- net
environment:
POSTGRES_USER:
POSTGRES_PASSWORD:
POSTGRES_DB:
pgweb:
image: sosedoff/pgweb:0.11.6
restart: unless-stopped
networks:
- net
depends_on:
- postgres
command: "/usr/bin/pgweb --bind=0.0.0.0 --listen=8082 --url postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?sslmode=disable"
labels:
- "traefik.enable=true"
- "traefik.http.routers.pgweb.rule=Host(`pgweb.${BASE_DOMAIN}`)"
- "traefik.http.services.pgweb.loadbalancer.server.port=8082"
mailhog:
image: mailhog/mailhog
networks:
- net
labels:
- "traefik.enable=true"
- "traefik.http.routers.mailhog.rule=Host(`mailhog.${BASE_DOMAIN}`)"
- "traefik.http.services.mailhog.loadbalancer.server.port=8025"
api:
image: node:${NODE_VERSION}
working_dir: /usr/src/app
user: "${USER_ID}:${GROUP_ID}"
command: sh -c "yarn install && yarn start:dev"
restart: unless-stopped
volumes:
- ./api:/usr/src/app
networks:
- net
environment:
HOST: 0.0.0.0
PORT: 3000
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.rule=Host(`api.${BASE_DOMAIN}`)"
- "traefik.http.services.api.loadbalancer.server.port=3000"
client:
image: node:${NODE_VERSION}
working_dir: /usr/src/app
user: "${USER_ID}:${GROUP_ID}"
command: sh -c "yarn install && yarn start"
restart: unless-stopped
volumes:
- ./client:/usr/src/app
networks:
- net
stdin_open: true # required to keep react process alive
environment:
HOST: 0.0.0.0
PORT: 3000
labels:
- "traefik.enable=true"
- "traefik.http.routers.client.rule=Host(`${BASE_DOMAIN}`)"
- "traefik.http.services.client.loadbalancer.server.port=3000"