-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yaml
84 lines (78 loc) · 1.62 KB
/
docker-compose.prod.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
version: "3.9"
services:
nginx:
container_name: nginx
image: nginx:stable
ports:
- "81:80" # nginx-default
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/conf.d:/etc/nginx/conf.d
depends_on:
- scrap
- web
- apollo
- express
scrap:
image: airlog:scrap
build:
context: ./scrap
dockerfile: Dockerfile
# volumes:
# - ./scrap/app:/app
depends_on:
- mariadb
deploy:
replicas: 3
web:
container_name: web
image: airlog:web
build:
context: ./web
dockerfile: Dockerfile.prod
command: yarn start -p 3000
ports:
- "3000:3000"
# volumes:
# - ./web/app:/app
depends_on:
- mariadb
apollo:
image: airlog:apollo
build:
context: ./apollo
dockerfile: Dockerfile.prod
command: yarn start
# volumes:
# - ./apollo/app:/app
environment:
NODE_ENV: "production"
PORT: 4000
depends_on:
- mariadb
express:
image: airlog:express
build:
context: ./express
dockerfile: Dockerfile.prod
command: yarn start
volumes:
- ./express/app/src/assets:/app/src/assets
environment:
NODE_ENV: "production"
PORT: 4000
depends_on:
- mariadb
mariadb:
container_name: mariadb
image: mariadb:10.6-focal
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: admin
MYSQL_PASSWORD: admin
MYSQL_DATABASE: airlog
volumes:
- ./mariadb/init:/docker-entrypoint-initdb.d
- ./mariadb/data:/var/lib/mysql