web-app-chess: refactor runtime & entrypoint

- Move entrypoint to files/ and deploy via copy
- Parameterize APP_KEY_FILE, data dir, and entrypoint paths
- Require explicit PORT/PG envs (remove fallbacks)
- Drop stray header from config/main.yml
- Dockerfile: use templated data dir & entrypoint; keep node user
- Compose: set custom image, adjust volume mapping
- env: derive APP_SCHEME from WEB_PROTOCOL; NODE_ENV from ENVIRONMENT
- tasks: add 01_core and simplify main to include it

Ref: https://chatgpt.com/share/68b851c5-4dd8-800f-8e9e-22b985597b8f
This commit is contained in:
2025-09-03 16:34:04 +02:00
parent df122905eb
commit a1130e33d7
9 changed files with 38 additions and 38 deletions

View File

@@ -1,11 +1,11 @@
# App basics
APP_SCHEME="{{ 'https' if WEB_PROTOCOL == 'https' else 'http' }}"
APP_SCHEME="{{ WEB_PROTOCOL }}"
APP_DOMAIN="{{ CHESS_HOSTNAME }}"
APP_ADMIN_URL="{{ CHESS_ADMIN_URL }}"
APP_ADMIN_EMAIL="{{ CHESS_ADMIN_EMAIL }}"
APP_KEY_FILE="/app/data/{{ CHESS_KEY_FILENAME }}"
APP_KEY_FILE="{{ CHESS_APP_KEY_FILE }}"
APP_HMAC_SECRET="{{ CHESS_HMAC_SECRET }}"
NODE_ENV="production"
NODE_ENV="{{ ENVIRONMENT }}"
PORT="{{ container_port }}"
# PostgreSQL (libpq envs)