NTP_V2/deploy/prod/docker-compose.yml

21 lines
900 B
YAML

# Production: one container (API + web app). Same image recipe as QA (deploy/qa/Dockerfile) built in production mode
# (web/.env.production). A reverse proxy publishes it over https; see apache-ntp.conf.
# Run from this folder after creating .env (copy .env.example): docker compose up -d --build
services:
ntp:
# Jenkins sets NTP_IMAGE to <registry>/ntpv2:<build number>; the production server only pulls it (docker compose pull).
image: ${NTP_IMAGE:-ntpv2:prod}
container_name: ntpv2-prod
build:
context: ../..
dockerfile: deploy/qa/Dockerfile
args:
WEB_MODE: build:prod
restart: unless-stopped
env_file: .env
environment:
ASPNETCORE_ENVIRONMENT: Production
ports:
# change the left side (or set NTP_PORT in .env) when 8081 is taken; use 127.0.0.1: when the proxy runs on this host
- "127.0.0.1:${NTP_PORT:-8081}:8080"