# Production. install.sh sets this up on a server (see README); by hand it is: # clone into /opt/__NAME__, write .env from .env.example, docker compose up -d --build # Deploys after that: docker exec __NAME__ update name: __NAME__ services: app: build: context: . dockerfile: container/Dockerfile image: __NAME__:latest container_name: __NAME__ restart: unless-stopped environment: CONTAINER_NAME: __NAME__ # Only a reverse proxy at these addresses may set X-Forwarded-For. FORWARDED_ALLOW_IPS: ${FORWARDED_ALLOW_IPS:-127.0.0.1} # Loopback only: put a reverse proxy or tunnel in front of it. ports: - "127.0.0.1:${HOST_PORT:-__PORT__}:8000" volumes: - runtime:/srv # source checkout, venv, update state - data:/data # the app's persistent data # Repo URL, credentials and app settings, read on every start and every update. # Not env_file: a mounted file can change without recreating the container. - ./.env:/run/config/app.env:ro read_only: true tmpfs: - /tmp cap_drop: [ALL] security_opt: - no-new-privileges:true mem_limit: 256m logging: driver: json-file options: max-size: 10m max-file: "3" volumes: runtime: data: