-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
78 lines (71 loc) · 2.01 KB
/
Copy pathdocker-compose.yml
File metadata and controls
78 lines (71 loc) · 2.01 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
services:
# Baza danych PostgreSQL
postgres:
image: postgres:15-alpine
container_name: qr_postgres
environment:
POSTGRES_USER: qruser
POSTGRES_PASSWORD: qrpass123
POSTGRES_DB: qr_database
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./Database/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U qruser -d qr_database"]
interval: 10s
timeout: 5s
retries: 5
# Aplikacja FastAPI
fastapi_app:
build: ./app
container_name: qr_face_app
ports:
- "8000:8000"
volumes:
# 1. Montujemy kod aplikacji (dla hot-reload)
- ./app:/app
# 2. ZMIANA: Montujemy foldery z katalogu 'Database' hosta
# do odpowiednich ścieżek w kontenerze
- ./Database/reference_faces:/app/reference_faces
- ./Database/uploads:/app/uploads
environment:
# Ważne: DeepFace tworzy pliki .pkl, upewnij się, że ma prawa zapisu (zazwyczaj root w kontenerze je ma)
DATABASE_URL: postgresql://qruser:qrpass123@postgres:5432/qr_database
depends_on:
postgres:
condition: service_healthy
# Dodajemy --reload, aby zmiany w kodzie były widoczne natychmiast
command: uvicorn main:app --host 0.0.0.0 --port 8000 --reload
# GUI pgAdmin
pgadmin:
image: dpage/pgadmin4:latest
container_name: qr_pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: admin
ports:
- "5050:80"
depends_on:
- postgres
volumes:
- pgadmin_data:/var/lib/pgadmin
# Frontend
frontend:
build: ./admin-panel
container_name: admin_panel
ports:
- "5173:80"
depends_on:
- fastapi_app
#mail-hog
mailhog:
image: mailhog/mailhog:latest
container_name: qr_mailhog
ports:
- "1025:1025" # SMTP – aplikacja wysyła maile tutaj
- "8025:8025" # Web UI – podgląd wiadomości
volumes:
postgres_data:
pgadmin_data: