-
Notifications
You must be signed in to change notification settings - Fork 611
/
docker-compose-prod.yml
60 lines (56 loc) · 1.29 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
version: "3"
networks:
gd-network:
driver: bridge
services:
server:
container_name: server
build:
context: ./
dockerfile: server/Dockerfile
depends_on:
- db
networks:
- gd-network
expose:
- "${GD_API_SERVER_PORT}"
ports:
- "${GD_API_SERVER_PORT}:${GD_API_SERVER_PORT}"
restart: on-failure
volumes:
- .:/home/app/generatedata
- /home/app/generatedata/node_modules
environment:
- NODE_ENV=production
db:
container_name: db
image: mariadb:10.5.8
command: --default-authentication-plugin=mysql_native_password
restart: always
expose:
- "${GD_DB_PORT}"
ports:
- "${GD_DB_PORT}:${GD_DB_PORT}"
networks:
- gd-network
environment:
MYSQL_ROOT_PASSWORD: ${GD_MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${GD_DB_NAME}
MYSQL_ALLOW_EMPTY_PASSWORD: ok
volumes:
- ./server/database/_dbStructure.sql:/docker-entrypoint-initdb.d/setup.sql
- ./data/db:/var/lib/mysql
# contains the webapp + starts nginx
webapp:
container_name: webapp
image: nginx:latest
ports:
- "${GD_WEB_SERVER_PORT}:80"
volumes:
- ./client/dist:/usr/share/nginx/html
depends_on:
- server
links:
- server
networks:
- gd-network