services: api: image: ${API_IMAGE:-__APP_SLUG__-api:local} build: context: ./api restart: unless-stopped init: true stop_grace_period: 30s read_only: true tmpfs: - /tmp:size=64m,mode=1777 security_opt: - no-new-privileges:true cap_drop: - ALL env_file: - ${APP_ENV_FILE:-.env.example} volumes: - sqlite_data:/app/instance healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:5000/api/health/ready')"] interval: 15s timeout: 5s retries: 5 start_period: 20s ports: - "127.0.0.1:${BORTSTACK_API_PORT:-5001}:5000" networks: - internal nginx: image: ${NGINX_IMAGE:-__APP_SLUG__-nginx:local} build: context: . dockerfile: nginx/Dockerfile restart: unless-stopped init: true stop_grace_period: 15s security_opt: - no-new-privileges:true depends_on: api: condition: service_healthy healthcheck: test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://127.0.0.1/"] interval: 15s timeout: 5s retries: 5 start_period: 10s ports: - "127.0.0.1:${BORTSTACK_WEB_PORT:-8081}:80" networks: - internal networks: internal: internal: true volumes: sqlite_data: