-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (67 loc) · 2.39 KB
/
Copy pathdocker-compose.yml
File metadata and controls
72 lines (67 loc) · 2.39 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
version: "3.9"
services:
# ─── Nginx — reverse proxy + rate limiter ─────────────────────────────────
nginx:
image: nginx:alpine
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- api
- frontend
restart: unless-stopped
# ─── FastAPI Backend ───────────────────────────────────────────────────────
api:
build:
context: ./backend
dockerfile: Dockerfile
env_file:
- .env
environment:
- DATABASE_URL=${DATABASE_URL}
- MONGO_URI=${MONGO_URI}
- MONGO_DB_NAME=${MONGO_DB_NAME}
- SECRET_KEY=${SECRET_KEY}
- ALGORITHM=${ALGORITHM}
- ACCESS_TOKEN_EXPIRE_MINUTES=${ACCESS_TOKEN_EXPIRE_MINUTES}
- ALLOWED_ORIGINS=${ALLOWED_ORIGINS}
- STORAGE_ENDPOINT=http://minio:9000
- STORAGE_ACCESS_KEY=${MINIO_ROOT_USER:-minioadmin}
- STORAGE_SECRET_KEY=${MINIO_ROOT_PASSWORD:-minioadmin}
- STORAGE_BUCKET=${STORAGE_BUCKET:-event-images}
- STORAGE_PUBLIC_URL=${STORAGE_PUBLIC_URL:-http://localhost:9000}
depends_on:
- minio
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"]
interval: 30s
timeout: 10s
retries: 3
# ─── Vue.js Frontend ───────────────────────────────────────────────────────
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
restart: unless-stopped
# ─── MinIO — local S3-compatible object storage ───────────────────────────
minio:
image: minio/minio:latest
ports:
- "9000:9000" # S3 API
- "9001:9001" # Web console
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-minioadmin}
command: server /data --console-address ":9001"
volumes:
- minio_data:/data
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 10s
retries: 3
volumes:
minio_data: