-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
95 lines (86 loc) · 1.67 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
version: '3.6'
x-build-args: &build_args
INSTALL_PYTHON_VERSION: 3.7
INSTALL_NODE_VERSION: 12
x-default-volumes: &default_volumes
volumes:
- ./:/app
- node-modules:/app/node_modules
services:
cataloger_db:
image: "postgres:11"
restart: always
env_file:
- .env
networks:
- cataloger
volumes:
- "db_data:/var/lib/postgresql/data"
- "backup:/backups"
flask-dev:
build:
context: .
target: development
args:
<<: *build_args
image: "cataloger-development"
depends_on:
- cataloger_db
networks:
- cataloger
ports:
- "0.0.0.0:5020:5020"
- "0.0.0.0:2992:2992"
<<: *default_volumes
flask-prod:
restart: always
build:
context: .
target: production
args:
<<: *build_args
image: "cataloger-production"
depends_on:
- cataloger_db
networks:
- cataloger
ports:
- "127.0.0.1:5020:5020"
restart: always
environment:
FLASK_ENV: production
FLASK_DEBUG: 0
LOG_LEVEL: info
GUNICORN_WORKERS: 4
<<: *default_volumes
restart: always
manage:
build:
context: .
target: manage
environment:
FLASK_ENV: production
FLASK_DEBUG: 0
image: "cataloger-manage"
depends_on:
- cataloger_db
networks:
- cataloger
stdin_open: true
tty: true
<<: *default_volumes
volumes:
node-modules:
static-build:
db_data:
driver_opts:
type: none
device: $HOME/data/cataloger
o: bind
backup:
driver_opts:
type: none
device: $HOME/data/backups/cataloger
o: bind
networks:
cataloger: