forked from CodeforKarlsruhe/co2runter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-prod.yml
64 lines (57 loc) · 1.21 KB
/
docker-compose-prod.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
version: '3.8'
x-common-variables: &common-variables
DOCKER: true
MYSQL_DATABASE: db_co2runter
MYSQL_USER: MYSQL_USER
MYSQL_PASSWORD: MYSQL_PASSWORD
TOKEN_KEY: adjuhskajdkjas
services:
mysql_db:
image: mysql
restart: always
cap_add:
- SYS_NICE
volumes:
- "./setup.sql:/docker-entrypoint-initdb.d/setup.sql"
ports:
- "9906:3306"
environment:
<<: *common-variables
MYSQL_ROOT_PASSWORD: "12345"
MYSQL_HOST: localhost
nginx:
depends_on:
- api
- client
restart: always
build:
dockerfile: Dockerfile
context: ./nginx
ports:
- "9001:80"
api:
restart: unless-stopped
build:
dockerfile: Dockerfile-Prod
context: "./server"
depends_on:
- mysql_db
volumes:
- /app/node_modules
- ./server:/app
environment:
<<: *common-variables
MYSQL_HOST_IP: mysql_db
NODE_ENV: production
client:
stdin_open: true
environment:
- WDS_SOCKET_PORT=3050
- CHOKIDAR_USEPOLLING=true
- WATCHPACK_POLLING=true
build:
dockerfile: Dockerfile-Prod
context: ./client
volumes:
- /app/node_modules
- ./client:/app