-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
128 lines (119 loc) · 3.45 KB
/
docker-compose.dev.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
121
122
123
124
125
126
127
128
services:
django:
# command: >
# gunicorn -b 0.0.0.0:$PORT
# --access-logfile -
# --reload
# --workers 2
# --timeout $TIMEOUT
# turtlenest.wsgi:application
command: python manage.py runserver 0.0.0.0:8000
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ./:/app
networks:
- public_proxy
- default
ports:
- "8000:8000"
labels:
caddy: ${DOMAIN}
caddy.log: ""
[email protected]: "/media* /static* /turtlestitch* /snap*"
caddy.0_redir: "/static/run* /turtlestitch"
caddy.1_handle: "@media"
caddy.1_handle.0_root: "/media* /app/"
caddy.1_handle.1_root: "/run* /app/guis/turtlestitch/"
caddy.1_handle.2_root: "/static* /app/"
caddy.1_handle.3_root: "/snap* /app/guis/"
caddy.1_handle.4_root: "/turtlestitch* /app/guis/"
caddy.1_handle.5_file_server: ""
caddy.2_handle: "/hooks*"
caddy.2_handle.0_reverse_proxy: "host.docker.internal:9000"
caddy.3_handle.0_reverse_proxy: "{{upstreams 8000}}"
# # #caddy.handle_errors.0_respond: "{err.status_code} {err.status_text}"
# # caddy.0_handle_errors.0_root: "* /app/static"
# # caddy.0_handle_errors.1_rewrite: "* /error.html"
# # caddy.0_handle_errors.2_file_server: ""
db:
restart: "no"
ports:
- "5432:5432"
caddy:
image: lucaslorentz/caddy-docker-proxy:ci-alpine
ports:
- 80:80
- 443:443
environment:
- CADDY_INGRESS_NETWORKS=public_proxy
networks:
- public_proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- caddy_data:/data:/data
- ${APP_DATA_DIR?./app-data}/media:/app/media
- ./static:/app/static
- ../turtlestitch:/app/guis/turtlestitch
- ../snap:/app/guis/snap
restart: unless-stopped
extra_hosts: #only for docker!
- "host.docker.internal:host-gateway"
# legacy-db:
# image: postgres:16
# env_file:
# - '.env'
# volumes:
# - ${APP_DATA_DIR?./app-data}/postgres-legacy-data:/var/lib/postgresql/data/
# - ${APP_DATA_DIR?./app-data}/postgres-init:/docker-entrypoint-initdb.d/
# healthcheck:
# test: pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}
# interval: 30s
# retries: 10
# start_period: 20s
# restart: unless-stopped
# redis:
# image: redis:7-alpine
# volumes:
# - redis-data:/data
# healthcheck:
# test: redis-cli ping | grep PONG
# interval: 30s
# retries: 10
# restart: unless-stopped
# celery:
# image: backface/turtlenest:latest
# build:
# context: ./
# dockerfile: Dockerfile
# entrypoint: celery -A turtlenest worker -l INFO --beat --concurrency 2
# volumes:
# - ./:/app
# env_file:
# - ./.env
# depends_on:
# db:
# condition: service_healthy
# redis:
# condition: service_healthy
# restart: unless-stopped
# flower:
# image: mher/flower:2.0
# container_name: flower
# command: celery flower --persisten=True
# env_file:
# - ./.env
# ports:
# - 8888:8888 # docker will expose this ports
# volumes:
# - APP_DATA_DIR/flower-data:/data
# restart: unless-stopped
volumes:
caddy_data:
# redis-data:
# flower-data:
networks:
public_proxy:
name: public_proxy
# For local dev, don't expect an external network
external: false