-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (52 loc) · 1.49 KB
/
docker-compose.yml
File metadata and controls
55 lines (52 loc) · 1.49 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
version: '3.8'
services:
# Backend API
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "${BACKEND_PORT:-8000}:8000"
environment:
# REQUIRED: Set these in .env file or pass via command line
- IMMICH_URL=${IMMICH_URL}
- IMMICH_API_KEY=${IMMICH_API_KEY}
- HOST=0.0.0.0
- PORT=8000
- DEBUG=${DEBUG:-false}
# Keep this as a JSON array string so pydantic can parse it without errors
- CORS_ORIGINS=${CORS_ORIGINS:-["http://localhost:3000"]}
restart: unless-stopped
networks:
- immich-gallery
# Allow access to host network for reaching external Immich
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD", "python", "-c", "import httpx; httpx.get('http://localhost:8000/api/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# Frontend (simple nginx)
frontend:
image: nginx:alpine
ports:
- "${FRONTEND_PORT:-3000}:80"
volumes:
- ./frontend:/usr/share/nginx/html:ro
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
backend:
condition: service_started
restart: unless-stopped
networks:
- immich-gallery
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost/"]
interval: 30s
timeout: 10s
retries: 3
networks:
immich-gallery:
driver: bridge