Files
BortStack/docker-compose.yml

62 lines
1.3 KiB
YAML

services:
api:
image: ${API_IMAGE:-bortstack-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}
environment:
CONTACT_TRUST_PROXY: 'true'
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:5001:5000"
networks:
- internal
nginx:
image: ${NGINX_IMAGE:-bortstack-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:8081:80"
networks:
- internal
- swag
networks:
internal:
internal: true
swag:
external: true
name: ${SWAG_NETWORK:-swagnet}