This repository has been archived by the owner on Aug 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev.yml
121 lines (114 loc) · 2.55 KB
/
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
version: '3.9'
volumes:
local_postgres_data: {}
local_postgres_data_backups: {}
services:
django: &django
image: v1k45/fanmo:2023.12.1164-dev
volumes:
- ./backend/fanmo/media:/app/fanmo/media
depends_on:
- postgres
- redis
networks:
- backend
- proxy
env_file:
- ./.envs/.dev/.django
- ./.envs/.dev/.nuxt
- ./.envs/.dev/.postgres
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/meta/"]
interval: 10s
timeout: 5s
retries: 5
deploy:
update_config:
order: start-first
failure_action: rollback
delay: 10s
rollback_config:
parallelism: 0
order: stop-first
restart_policy:
condition: any
delay: 10s
max_attempts: 50
postgres:
image: postgres:13.2-alpine
container_name: fanmo_postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- local_postgres_data:/var/lib/postgresql/data:Z
- local_postgres_data_backups:/backups:z
env_file:
- ./.envs/.dev/.postgres
networks:
- backend
deploy:
update_config:
order: start-first
failure_action: rollback
delay: 10s
rollback_config:
parallelism: 0
order: stop-first
restart_policy:
condition: any
delay: 10s
max_attempts: 50
mailhog:
image: mailhog/mailhog:v1.0.0
container_name: fanmo_mailhog
ports:
- "8025:8025"
networks:
- backend
redis:
image: redis:6-alpine
container_name: fanmo_redis
networks:
- backend
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
deploy:
update_config:
order: start-first
failure_action: rollback
delay: 10s
rollback_config:
parallelism: 0
order: stop-first
restart_policy:
condition: any
delay: 10s
max_attempts: 50
caddy:
image: "caddy:2.1.1"
restart: unless-stopped
depends_on:
- django
env_file: ./.envs/.dev/.caddy
container_name: fanmo_caddy
volumes:
- ./Caddyfile.local:/etc/caddy/Caddyfile
- ./caddy/data:/data
- ./caddy/config:/config
- ./backend/fanmo/media:/var/www/html/media
ports:
- "7070:80"
- "7777:443"
networks:
- proxy
networks:
backend:
driver: overlay
proxy:
driver: overlay