-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
158 lines (150 loc) · 4.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
158 lines (150 loc) · 4.2 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
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
services:
db:
image: postgres:15
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=calendint
ports:
- "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile.dev
container_name: calendint-backend
volumes:
- ./.env:/app/.env
- migration_data:/app/migration_state
environment:
- DATABASE_URL=postgresql://postgres:postgres@db:5432/calendint
- SMTP_HOST=mailhog
- SMTP_PORT=1025
- SMTP_USER=
- SMTP_PASSWORD=
- EMAILS_FROM_NAME=Calend'INT by MiNET
- CRON_DELAY=${CRON_DELAY:-900} # Default 15 minutes
- VAPID_PUBLIC_KEY=${VAPID_PUBLIC_KEY}
- VAPID_PRIVATE_KEY=${VAPID_PRIVATE_KEY}
- APP_TIMEZONE=${APP_TIMEZONE:-UTC}
- MEDIA_SIZES=${MEDIA_SIZES:-320,640,960,1280}
healthcheck:
test: [ "CMD-SHELL", "python3 -c \"import urllib.request; urllib.request.urlopen('http://localhost:8000/status')\"" ]
interval: 30s
timeout: 10s
retries: 3
depends_on:
db:
condition: service_healthy
mailhog:
condition: service_started
command: uv run uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
develop:
watch:
- action: sync
path: ./backend
target: /app
ignore:
- __pycache__/
- .venv/
- action: sync
path: ./backend/fixtures
target: /app/fixtures
- action: sync
path: ./backend/load_fixtures.py
target: /app/load_fixtures.py
- action: sync
path: ./backend/make_superadmin.py
target: /app/make_superadmin.py
- action: rebuild
path: ./backend/requirements.txt
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
container_name: calendint-frontend
volumes:
- /app/node_modules
environment:
- VITE_API_URL=/api
- VITE_MEDIA_SIZES=${MEDIA_SIZES:-320,640,960,1280}
develop:
watch:
- action: sync
path: ./frontend
target: /app
ignore:
- node_modules/
- action: rebuild
path: ./frontend/package.json
mailhog:
image: mailhog/mailhog
container_name: calendint-mailhog
nginx:
image: nginx:alpine
container_name: calendint-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.dev.conf:/etc/nginx/nginx.conf:ro
- ./nginx/certs:/etc/nginx/certs:ro
healthcheck:
test: [ "CMD-SHELL", "wget -qO- http://localhost/nginx_health || exit 1" ]
interval: 30s
timeout: 10s
retries: 3
environment:
- VITE_API_URL=http://localhost:8000
media-processor:
build:
context: ./media-processor
container_name: calendint-media-processor
environment:
- DATABASE_URL=postgresql://postgres:postgres@db:5432/calendint
- MINIO_ENDPOINT=minio:9000
- MINIO_ACCESS_KEY=minioadmin
- MINIO_SECRET_KEY=minioadmin
- MINIO_BUCKET=calendint
- MINIO_SECURE=false
- MEDIA_SIZES=${MEDIA_SIZES:-320,640,960,1280}
- POLL_INTERVAL=${POLL_INTERVAL:-10}
- RESET_RETRIES_ON_START=${RESET_RETRIES_ON_START:-false}
depends_on:
db:
condition: service_healthy
minio:
condition: service_started
restart: unless-stopped
minio:
image: minio/minio:latest
container_name: calendint-minio
command: server /data --console-address ":9001"
volumes:
- minio_data:/data
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
# Ports not exposed, accessible via nginx
pgadmin:
image: dpage/pgadmin4
container_name: calendint-pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: root
PGADMIN_SMTP_HOST: mailhog
PGADMIN_SMTP_PORT: 1025
volumes:
- ./pgadmin/servers.json:/pgadmin4/servers.json
depends_on:
- db
volumes:
postgres_data:
minio_data:
migration_data: