-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
61 lines (60 loc) · 1.21 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
version: '3.8'
services:
nginx1:
restart: always
image: nginx:1.21.3-alpine
depends_on:
- api
- cms
env_file: ./env/nginx.env
command: sh -c "envsubst '$$APP_SEVER_NAME' < /etc/nginx/conf.d/nginx.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
volumes:
- ./nginx.template:/etc/nginx/conf.d/nginx.template
- ./docker/data/logs/nginx/:/var/log/nginx/
networks:
- reverse-proxy
- backnet
db:
image: mariadb:10.3.9
networks:
- reverse-proxy
- backnet
ports:
- '3306:3306'
volumes:
- taskdb:/var/lib/mysql
env_file: ./env/db.env
api:
build: ./app
volumes:
- ./app:/code
ports:
- '80'
depends_on:
- db
links:
- db
networks:
- reverse-proxy
- backnet
env_file: ./env/api.env
restart: always
cms:
build: ./frontend
restart: always
networks:
- reverse-proxy
- backnet
env_file: ./env/cms.env
ports:
- '3000'
command:
"npm run start"
networks:
reverse-proxy:
external:
name: reverse-proxy
backnet:
driver: bridge
volumes:
taskdb: