-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.debug.yml
More file actions
61 lines (58 loc) · 1.86 KB
/
Copy pathdocker-compose.debug.yml
File metadata and controls
61 lines (58 loc) · 1.86 KB
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
version: '3.4'
# services:
# kantnprojektbackend:
# image: kantnprojektbackend
# build:
# context: .
# dockerfile: Dockerfile
# command: ["sh", "-c", "pip install debugpy -t /tmp && python /tmp/debugpy --wait-for-client --listen 0.0.0.0:5678 -m flask run --no-debugger --no-reload --host 0.0.0.0 --port 8002"]
# ports:
# - 8002:8002
# - 5678:5678
# environment:
# - FLASK_APP=manage.py
services:
web:
build:
context: ./services/web
dockerfile: Dockerfile.debug
command: gunicorn --bind 0.0.0.0:8002 manage:app
# command: ["sh", "-c", "pip install debugpy -t /tmp && python /tmp/debugpy --wait-for-client --listen 0.0.0.0:5678 -m flask run --no-debugger --no-reload --host 0.0.0.0 --port 8002"]
depends_on:
- postgres
# volumes:
# - .:/usr/src/app
expose:
#has to match with services/nginx/nginx.conf file port in the upstream part
- "8002"
ports:
#for debugging vs code needs a port opened:
- "10001:10001"
env_file:
- ./.env.debug
# environment:
# DATABASE_URL: postgres://kantnprojekt@postgres/kantn
postgres:
image: postgres:13-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
# I don't know why ports is not needed..
# ports:
# # helpful reference: https://docs.docker.com/compose/networking/
# - "5433:5432"
env_file:
- ./.env.postgres.prod
# environment:
# POSTGRES_USER: kantn
# POSTGRES_DB: kantnprojekt
# POSTGRES_PASSWORD: password
nginx:
build: ./services/nginx
ports:
# the second port (=Container_Port) has to match with services/nginx/nginx.conf file port in the server part
# the first port (=Host_Port) will be the one exposed to the server
- "8003:8001"
depends_on:
- web
volumes:
postgres_data: