138 lines
3.2 KiB
YAML
138 lines
3.2 KiB
YAML
networks:
|
|
e2e:
|
|
|
|
volumes:
|
|
e2e_db:
|
|
e2e_cache:
|
|
e2e_logs:
|
|
e2e_protected_media:
|
|
e2e_scan_directory:
|
|
|
|
services:
|
|
e2e-proxy:
|
|
image: reallibrephotos/librephotos-proxy:${tag}
|
|
container_name: e2e-proxy
|
|
restart: unless-stopped
|
|
environment:
|
|
BACKEND_NAME: e2e-backend
|
|
FRONTEND_NAME: e2e-frontend
|
|
volumes:
|
|
- e2e_scan_directory:/data
|
|
- e2e_protected_media:/protected_media
|
|
ports:
|
|
- 8080:80
|
|
healthcheck:
|
|
test: curl -sI localhost | grep HTTP | grep 200
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 12
|
|
depends_on:
|
|
e2e-backend:
|
|
condition: service_healthy
|
|
e2e-frontend:
|
|
condition: service_healthy
|
|
networks:
|
|
- e2e
|
|
|
|
e2e-db:
|
|
image: postgres:13
|
|
container_name: e2e-db
|
|
restart: unless-stopped
|
|
environment:
|
|
- POSTGRES_USER=${dbUser}
|
|
- POSTGRES_PASSWORD=${dbPass}
|
|
- POSTGRES_DB=${dbName}
|
|
volumes:
|
|
- e2e_db:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: psql -U ${dbUser} -d ${dbName} -c "SELECT 1;"
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 12
|
|
networks:
|
|
- e2e
|
|
|
|
e2e-frontend:
|
|
container_name: e2e-frontend
|
|
environment:
|
|
- DEBUG=1
|
|
- WDS_SOCKET_PORT=0 # needed for webpack-dev-server
|
|
tty: true
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile.dev
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ${codedir}/librephotos-frontend:/usr/src/app
|
|
healthcheck:
|
|
test: curl -sI localhost:3000 | grep HTTP | grep 200
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 24
|
|
depends_on:
|
|
e2e-backend:
|
|
condition: service_healthy
|
|
networks:
|
|
- e2e
|
|
|
|
e2e-backend:
|
|
container_name: e2e-backend
|
|
tty: true
|
|
stdin_open: true
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
args:
|
|
DEBUG: 1
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ${codedir}/librephotos:/code
|
|
- e2e_scan_directory:/data
|
|
- e2e_protected_media:/protected_media
|
|
- e2e_logs:/logs
|
|
- e2e_cache:/root/.cache
|
|
environment:
|
|
- SECRET_KEY=${shhhhKey:-}
|
|
- BACKEND_HOST=e2e-backend
|
|
- ADMIN_EMAIL=${adminEmail:-admin@localhost}
|
|
- ADMIN_USERNAME=${userName:-admin}
|
|
- ADMIN_PASSWORD=${userPass:-admin}
|
|
- DB_BACKEND=postgresql
|
|
- DB_NAME=${dbName}
|
|
- DB_USER=${dbUser}
|
|
- DB_PASS=${dbPass}
|
|
- DB_HOST=e2e-db
|
|
- DB_PORT=5432
|
|
- REDIS_HOST=e2e-redis
|
|
- REDIS_PORT=6379
|
|
- MAPBOX_API_KEY=${mapApiKey:-}
|
|
- WEB_CONCURRENCY=${gunniWorkers:-1}
|
|
- SKIP_PATTERNS=${skipPatterns:-}
|
|
- ALLOW_UPLOAD=${allowUpload:-true}
|
|
- DEBUG=1
|
|
- HEAVYWEIGHT_PROCESS=${HEAVYWEIGHT_PROCESS:-1}
|
|
healthcheck:
|
|
test: curl -sI localhost:8001 | grep HTTP | grep 401
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 24
|
|
depends_on:
|
|
e2e-db:
|
|
condition: service_healthy
|
|
e2e-redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- e2e
|
|
|
|
e2e-redis:
|
|
image: redis:6
|
|
container_name: e2e-redis
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 12
|
|
networks:
|
|
- e2e
|