-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
49 lines (45 loc) · 1.12 KB
/
Copy pathcompose.yaml
File metadata and controls
49 lines (45 loc) · 1.12 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
version: '3.8'
services:
web:
build: .
image: zclonic-app:latest
container_name: zclonic_web
ports:
- "5000:5000"
environment:
- FLASK_ENV=development
- PYTHONUNBUFFERED=1
- FLASK_APP=app.py
- DATABASE_URL=postgresql://zclonic:changeme@db:5432/zclonic_db
- SQLALCHEMY_DATABASE_URI=postgresql://zclonic:changeme@db:5432/zclonic_db
- CONFIG_MODULE=/app/config.py
volumes:
- ./:/app:rw
- ./venv:/app/venv:ro
- ./config.py:/app/config.py:ro
depends_on:
- db
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:5000/ || exit 1"]
interval: 30s
timeout: 10s
retries: 3
# Optional: a tiny static reverse-proxy for production testing (disabled by default)
nginx:
image: nginx:stable-alpine
container_name: zclonic_nginx
ports:
- "8080:80"
volumes:
- ./deploy/nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- web
restart: unless-stopped
volumes:
dbdata: {}
pgdata:
driver: local
networks:
default:
name: zclonic_network