27 lines
808 B
YAML

version: "3.8"
x-common: &common
pull_policy: always # always, never, missing, build
restart: unless-stopped
stop_signal: SIGINT
stop_grace_period: 1m
logging:
driver: "json-file"
options:
max-file: "10"
max-size: "100m"
services:
hkchc-payment-frontend-server:
image: registry.hkchc.team/hkchc-payment-frontend:latest
container_name: hkchc-payment-frontend
environment:
APP_API_URL: "10.10.0.152:50000" # payment backend service
working_dir: /etc/nginx/conf.d/
ports:
- "50001:80"
command: [
"sed -i \"s~<!--app_url-->~<script>const APP_SITE_URL='${APP_SITE_URL}';</script>~\" /app/index.html && envsubst '$APP_API_URL' < default.conf.template > default.conf && cat default.conf",
"nginx -g daemon off;"
]
<<: *common