Files
luzzle/apps/web/docker-compose.yml

111 lines
2.8 KiB
YAML

services:
luzzle-web:
build:
context: ../..
dockerfile: apps/web/Dockerfile
secrets:
- npmrc
container_name: luzzle-web
user: "${UID:-1000}:${GID:-1000}"
env_file: .env
ports:
- "3000:3000"
volumes:
- ./demo/assets/pieces:/app/assets/pieces
- ./demo/assets/previews:/app/assets/previews:ro
- ./demo/config:/app/config:ro
- ./demo/data:/app/data
- ./demo/content:/app/content
- ./demo/archive:/app/archive
networks:
- luzzle
healthcheck:
test: ["CMD-SHELL", "node -e \"fetch('http://127.0.0.1:3000/api/health').then(r => r.ok ? process.exit(0) : process.exit(1)).catch(() => process.exit(1))\""]
interval: 5s
timeout: 3s
retries: 3
start_period: 30s
luzzle-worker:
build:
context: ../..
dockerfile: packages/web/worker/Dockerfile
secrets:
- npmrc
container_name: luzzle-worker
user: "${UID:-1000}:${GID:-1000}"
env_file: .env
networks:
- luzzle
volumes:
- ./demo/config:/app/config:ro
- ./demo/assets:/app/assets
- ./demo/data:/app/data
- ./demo/archive:/app/archive
- ./demo/rclone:/app/rclone
- ./demo/remote:/app/remote
- ./demo/cdn:/app/cdn
- ./demo/content:/app/content
- ./nginx/cache:/app/nginx
healthcheck:
test: ["CMD-SHELL", "node -e \"fetch('http://127.0.0.1:9000/health').then(r => r.ok ? process.exit(0) : process.exit(1)).catch(() => process.exit(1))\""]
interval: 5s
timeout: 3s
retries: 3
start_period: 30s
luzzle-lsp:
build:
context: ../..
dockerfile: packages/web/lsp/Dockerfile
secrets:
- npmrc
container_name: luzzle-lsp
user: '${UID:-1000}:${GID:-1000}'
networks:
- luzzle
ports:
- '9001:9001'
volumes:
- ./demo/archive:/app/archive
healthcheck:
test: ["CMD-SHELL", "node -e \"fetch('http://127.0.0.1:9001/health').then(r => r.ok ? process.exit(0) : process.exit(1)).catch(() => process.exit(1))\""]
interval: 5s
timeout: 3s
retries: 3
start_period: 30s
luzzle-proxy:
build:
context: ../..
dockerfile: packages/web/proxy/Dockerfile
container_name: luzzle-proxy
user: '${UID:-1000}:${GID:-1000}'
ports:
- "8080:8080"
networks:
- luzzle
volumes:
- ./nginx/cache:/tmp/cache
- ./nginx/logs:/tmp/logs
depends_on:
luzzle-web:
condition: service_healthy
luzzle-lsp:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1:8080/api/health || exit 1"]
interval: 5s
timeout: 3s
retries: 3
start_period: 30s
secrets:
npmrc:
file: $HOME/.npmrc
networks:
luzzle:
driver: bridge