Skip to content

Commit 24b9132

Browse files
committed
commit d1f5e6a7b8c9d0e1f2a3b4c5d6e7f8g9h0i1j2k3
1 parent 74f71c8 commit 24b9132

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

compose.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
version: '3.8'
2+
3+
services:
4+
web:
5+
build: .
6+
image: zclonic-app:latest
7+
container_name: zclonic_web
8+
ports:
9+
- "5000:5000"
10+
environment:
11+
- FLASK_ENV=development
12+
- PYTHONUNBUFFERED=1
13+
- FLASK_APP=app.py
14+
- DATABASE_URL=postgresql://zclonic:changeme@db:5432/zclonic_db
15+
- SQLALCHEMY_DATABASE_URI=postgresql://zclonic:changeme@db:5432/zclonic_db
16+
- CONFIG_MODULE=/app/config.py
17+
volumes:
18+
- ./:/app:rw
19+
- ./venv:/app/venv:ro
20+
- ./config.py:/app/config.py:ro
21+
depends_on:
22+
- db
23+
restart: unless-stopped
24+
healthcheck:
25+
test: ["CMD-SHELL", "curl -f http://localhost:5000/ || exit 1"]
26+
interval: 30s
27+
timeout: 10s
28+
retries: 3
29+
30+
# Optional: a tiny static reverse-proxy for production testing (disabled by default)
31+
nginx:
32+
image: nginx:stable-alpine
33+
container_name: zclonic_nginx
34+
ports:
35+
- "8080:80"
36+
volumes:
37+
- ./deploy/nginx.conf:/etc/nginx/conf.d/default.conf:ro
38+
depends_on:
39+
- web
40+
restart: unless-stopped
41+
42+
volumes:
43+
dbdata: {}
44+
pgdata:
45+
driver: local
46+
47+
networks:
48+
default:
49+
name: zclonic_network

0 commit comments

Comments
 (0)