-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
59 lines (59 loc) · 1.55 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
version: '3'
services:
flask:
image: python:3.7.7
restart: always
ports:
- '20010:80'
volumes:
- .:/code
# - /etc/localtime:/etc/localtime:ro
- node_modules:/code/app/static/node_modules
working_dir: "/code"
links:
- "database:db"
env_file:
- ./docker/config.env
entrypoint: ["/bin/sh", "-c"]
command:
- |
python -m pip install -r requirements.txt
python main.py
nodejs:
image: node:12.18.4
volumes:
- ./app/static/package.json:/static/package.json
- node_modules:/static/node_modules
working_dir: '/static'
command: 'npm install'
database:
image: mariadb:10.5.10
restart: always
expose:
- '3306'
volumes:
- "./docker/mariadb/ddl.sql:/docker-entrypoint-initdb.d/1.sql"
- "./docker/mariadb/data.sql:/docker-entrypoint-initdb.d/2.sql"
- "./docker/mariadb/mariadb.cnf:/etc/mysql/conf.d/mariadb.cnf"
# - /etc/localtime:/etc/localtime:ro
env_file:
- ./docker/config.env
command:
- mysqld
- --character-set-server=utf8
- --collation-server=utf8_general_ci
# nginx:
# image: 'nginx'
# restart: always
# ports:
# - '20011:443'
# - '20010:80'
# links:
# - 'flask'
# volumes:
# - './docker/nginx/default.conf:/etc/nginx/conf.d/default.conf'
# - './docker/nginx/certificate.crt:/etc/ssl/certificate.crt'
# - './docker/nginx/private.key:/etc/ssl/private.key'
# - './docker/nginx/ssl.conf:/etc/nginx/conf.d/snippets/ssl.conf'
volumes:
node_modules: