-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
120 lines (110 loc) · 2.4 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
version: '3.6'
x-build-args: &build_args
INSTALL_PYTHON_VERSION: 3.8
INSTALL_NODE_VERSION: 12
x-default-volumes: &default_volumes
volumes:
- ./:/app
- node-modules:/app/node_modules
- ./dev.db:/tmp/db
services:
flask-dev:
build:
context: .
target: development
args:
<<: *build_args
image: 'tambola-development'
ports:
- '5000:5000'
- '2992:2992'
depends_on:
- db
networks:
service_network:
<<: *default_volumes
flask-prod:
build:
context: .
target: production
args:
<<: *build_args
image: 'tambola-production'
expose:
- 5000
environment:
FLASK_ENV: production
FLASK_DEBUG: 0
LOG_LEVEL: info
GUNICORN_WORKERS: 4
HTTP_PORT: 5000
VIRTUAL_HOST: tambola.sidharth.dev
LETSENCRYPT_HOST: tambola.sidharth.dev
LETSENCRYPT_EMAIL: '[email protected]'
networks:
service_network:
depends_on:
- nginx-proxy-letsencrypt
- db
<<: *default_volumes
manage:
build:
context: .
target: manage
environment:
FLASK_ENV: production
FLASK_DEBUG: 0
image: 'tambola-manage'
stdin_open: true
tty: true
depends_on:
- db
networks:
service_network:
<<: *default_volumes
db:
image: postgres:12-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=tambola
- POSTGRES_PASSWORD=tambola
- POSTGRES_DB=tambola
networks:
service_network:
nginx-proxy:
image: jwilder/nginx-proxy
ports:
- 80:80
- 443:443
container_name: nginx-proxy
networks:
service_network:
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- nginx-certs:/etc/nginx/certs
- nginx-vhost:/etc/nginx/vhost.d
- nginx-html:/usr/share/nginx/html
nginx-proxy-letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
environment:
NGINX_PROXY_CONTAINER: 'nginx-proxy'
networks:
service_network:
depends_on:
- nginx-proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- nginx-certs:/etc/nginx/certs
- nginx-vhost:/etc/nginx/vhost.d
- nginx-html:/usr/share/nginx/html
networks:
service_network:
volumes:
nginx-certs:
nginx-vhost:
nginx-html:
postgres_data:
node-modules:
static-build:
dev-db: