mirror of
https://github.com/Haxxnet/Compose-Examples
synced 2024-11-27 14:01:15 +00:00
82 lines
2.1 KiB
YAML
82 lines
2.1 KiB
YAML
services:
|
|
|
|
proxy:
|
|
image: reallibrephotos/librephotos-proxy:${tag}
|
|
container_name: librephotos-proxy
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ${scanDirectory}:/data
|
|
- ${data}/protected_media:/protected_media
|
|
ports:
|
|
- ${httpPort}:80
|
|
depends_on:
|
|
- backend
|
|
- frontend
|
|
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: librephotos-db
|
|
restart: unless-stopped
|
|
environment:
|
|
- POSTGRES_USER=${dbUser}
|
|
- POSTGRES_PASSWORD=${dbPass}
|
|
- POSTGRES_DB=${dbName}
|
|
volumes:
|
|
- ${data}/db:/var/lib/postgresql/data
|
|
command: postgres -c fsync=off -c synchronous_commit=off -c full_page_writes=off -c random_page_cost=1.0
|
|
healthcheck:
|
|
test: psql -U ${dbUser} -d ${dbName} -c "SELECT 1;"
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
frontend:
|
|
image: reallibrephotos/librephotos-frontend:${tag}
|
|
container_name: frontend
|
|
restart: unless-stopped
|
|
|
|
backend:
|
|
image: reallibrephotos/librephotos:${tag}
|
|
container_name: librephotos-backend
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ${scanDirectory}:/data
|
|
- ${data}/protected_media:/protected_media
|
|
- ${data}/logs:/logs
|
|
- ${data}/cache:/root/.cache
|
|
environment:
|
|
- SECRET_KEY=${shhhhKey:-}
|
|
- BACKEND_HOST=backend
|
|
- ADMIN_EMAIL=${adminEmail:-}
|
|
- ADMIN_USERNAME=${userName:-}
|
|
- ADMIN_PASSWORD=${userPass:-}
|
|
- DB_BACKEND=postgresql
|
|
- DB_NAME=${dbName}
|
|
- DB_USER=${dbUser}
|
|
- DB_PASS=${dbPass}
|
|
- DB_HOST=${dbHost}
|
|
- DB_PORT=5432
|
|
- REDIS_HOST=redis
|
|
- REDIS_PORT=6379
|
|
- MAPBOX_API_KEY=${mapApiKey:-}
|
|
- WEB_CONCURRENCY=${gunniWorkers:-1}
|
|
- SKIP_PATTERNS=${skipPatterns:-}
|
|
- ALLOW_UPLOAD=${allowUpload:-false}
|
|
- DEBUG=0
|
|
- HEAVYWEIGHT_PROCESS=${HEAVYWEIGHT_PROCESS:-}
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: librephotos-redis
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 12
|