41 lines
1014 B
YAML
41 lines
1014 B
YAML
name: ridebus-pwa
|
|
|
|
services:
|
|
web:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
init: true
|
|
environment:
|
|
NODE_ENV: production
|
|
HOST: 0.0.0.0
|
|
PORT: "5173"
|
|
RIDEBUS_API_BASE_URL: ${RIDEBUS_API_BASE_URL:-https://api.ridebus.by/}
|
|
RIDEBUS_API_KEY: ${RIDEBUS_API_KEY:?Set RIDEBUS_API_KEY in .env}
|
|
ports:
|
|
- "${PWA_BIND_ADDRESS:-127.0.0.1}:${PWA_PORT:-8080}:5173"
|
|
read_only: true
|
|
tmpfs:
|
|
- /tmp:rw,noexec,nosuid,size=16m
|
|
cap_drop:
|
|
- ALL
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
healthcheck:
|
|
test:
|
|
- CMD
|
|
- node
|
|
- --input-type=module
|
|
- -e
|
|
- "const response = await fetch('http://127.0.0.1:5173/healthz', { signal: AbortSignal.timeout(3000) }); process.exit(response.ok ? 0 : 1);"
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|