-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
115 lines (108 loc) · 2.67 KB
/
docker-compose.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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
version: '3'
services:
postgres:
image: postgres
env_file:
- ./packages/api/.env
labels:
- "traefik.enable=false"
ports:
- "5434:5432"
pgadmin4:
image: dpage/pgadmin4
depends_on:
- postgres
env_file:
- ./packages/api/.env
labels:
- "traefik.enable=false"
ports:
- "81:80"
build:
image: node:18
volumes:
- .:/home/node/app
user: "${DOCKER_USER}:${DOCKER_GROUP}"
working_dir: '/home/node/app'
command: yarn build:watch --preserveWatchOutput
labels:
- "traefik.enable=false"
tty: true
api:
image: node:18
env_file:
- ./packages/api/.env
user: "${DOCKER_USER}:${DOCKER_GROUP}"
depends_on:
- postgres
- build
ports:
- "3000:3000"
- "9231:9231"
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.rule=Host(`${PROJECT_DOMAIN}`) && PathPrefix(`/api`)"
- "traefik.http.services.api.loadbalancer.server.port=3000"
- "traefik.http.routers.api.entrypoints=web"
volumes:
- .:/home/node/app
working_dir: '/home/node/app/packages/api'
command: yarn start
tty: true
ui:
image: node:18
env_file:
- ./packages/ui/.env
user: "${DOCKER_USER}:${DOCKER_GROUP}"
depends_on:
- api
- build
ports:
- "4000:4000"
labels:
- "traefik.enable=true"
- "traefik.http.routers.ui.rule=Host(`${PROJECT_DOMAIN}`)"
- "traefik.http.services.ui.loadbalancer.server.port=4000"
- "traefik.http.routers.ui.entrypoints=web"
volumes:
- .:/home/node/app
working_dir: '/home/node/app/packages/ui'
command: yarn start
stdin_open: true
tty: true
admin-ui:
image: node:18
env_file:
- ./packages/admin-ui/.env
user: "${DOCKER_USER}:${DOCKER_GROUP}"
depends_on:
- api
- build
ports:
- "5000:5000"
volumes:
- .:/home/node/app
labels:
- "traefik.enable=true"
- "traefik.http.routers.admin-ui.rule=Host(`${PROJECT_DOMAIN}`) && PathPrefix(`/admin-ui`)"
- "traefik.http.services.admin-ui.loadbalancer.server.port=5000"
- "traefik.http.routers.admin-ui.entrypoints=web"
working_dir: '/home/node/app/packages/admin-ui'
command: yarn start
stdin_open: true
tty: true
reverse-proxy:
image: traefik:v3.0
command:
- "--providers.docker"
- "--api.insecure=true"
- "--api.dashboard=true"
- "--api.debug=true"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
labels:
- "traefik.enable=false"