-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
119 lines (113 loc) · 2.83 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
services:
labs-engine-dev:
profiles:
- dev
image: neoformit/galaxy-labs-engine:latest
build: .
container_name: labs-engine-dev-runserver
networks:
- labs-engine-network
ports:
- "8000:8000"
- "5678:5678"
volumes:
- type: bind
source: .
target: /srv/labs-engine
environment:
- DJANGO_SETTINGS_MODULE=app.settings.dev
command: python manage.py runserver 0.0.0.0:8000
restart: always
working_dir: /srv/labs-engine/app
labs-engine-debug:
profiles:
- debug
image: neoformit/galaxy-labs-engine:latest
build: .
container_name: labs-engine-debug
networks:
- labs-engine-network
ports:
- "8000:8000"
- "5678:5678" # attach vscode debug
volumes:
- type: bind
source: .
target: /srv/labs-engine
environment:
- DJANGO_SETTINGS_MODULE=app.settings.dev
command: >
python -m debugpy
--listen 0.0.0.0:5678
--wait-for-client
manage.py runserver 0.0.0.0:8000
restart: always
working_dir: /srv/labs-engine/app
labs-engine:
profiles:
- prod
image: neoformit/galaxy-labs-engine:latest
user: "33:33"
container_name: labs-engine
networks:
- labs-engine-network
ports:
- "8000:8000"
volumes:
- /srv:/srv
environment:
- DJANGO_SETTINGS_MODULE=app.settings.prod
command: >
gunicorn
--bind 0.0.0.0:8000
--access-logfile='-'
--error-logfile='-'
--capture-output
--log-level info
-c /srv/config/gunicorn.py
app.wsgi:application
restart: always
working_dir: /srv/labs-engine/app
nginx:
profiles:
- prod
- certbot
image: nginx:latest
container_name: nginx
networks:
- labs-engine-network
ports:
- "80:80"
- "443:443"
volumes:
- ./app/app/static:/var/www/static:ro
- ./app/app/media:/var/www/media:ro
- ./server/nginx/ssl:/etc/nginx/ssl:ro
- /srv/config/nginx.conf:/etc/nginx/conf.d/nginx.conf:ro
- /var/log/nginx:/var/log/nginx:rw
- /var/www/certbot/:/var/www/certbot/:ro
- /etc/letsencrypt:/etc/letsencrypt:ro
restart: always
certbot-init:
profiles:
- certbot
depends_on:
- nginx
image: certbot/certbot:latest
container_name: certbot
volumes:
- /var/www/certbot:/var/www/certbot:rw
- /etc/letsencrypt:/etc/letsencrypt:rw
certbot:
profiles:
- certbot
# depends_on: # N.B. certbot depends on nginx but it's usually running and
# - nginx # causes a container name collision
image: certbot/certbot:latest
container_name: certbot
volumes:
- /var/www/certbot:/var/www/certbot:rw
- /etc/letsencrypt:/etc/letsencrypt:rw
networks:
labs-engine-network:
driver: bridge