mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
fix(infra): working container entrypoint; add local-only ports override
- compose.yaml: set -a before sourcing (sourced assignments were shell-only, envsubst saw nothing) + inline nginx command (a compose entrypoint override drops the image CMD; empty $@ exit-0 restart-looped locally and on the VPS) - compose.override.yaml: local-only auto-merged override publishing 127.0.0.1:8081 (8080 taken on the dev machine); never shipped by the pipeline - verified locally end-to-end: stack Up, probe 200, rendered default.conf carries real values, nginx -t OK; built site + 401-protected /api/content/ served through the published port - docs: spec D13/§4.1 entrypoint corrected, §6 port-exposure open question + docker inspect check, rows 4/9; README local-stack section; AGENTS.md inventory
This commit is contained in:
1 parent
a5a525ff14
commit
cf216e5962
5 files changed
+29
-13
No files matched your search
+7
-4
@@ -8,10 +8,13 @@ services:
|
||||
container_name: dong-site
|
||||
restart: unless-stopped
|
||||
# Source the config file, then hand over to the image's official entrypoint.
|
||||
# "$$@" is compose's escape: the rendered command sees "$@", forwarding the
|
||||
# image's default CMD (nginx -g 'daemon off;') — without it nginx
|
||||
# daemonizes and the container exits.
|
||||
entrypoint: ["sh", "-c", ". /run/secrets/site_config && exec /docker-entrypoint.sh \"$$@\""]
|
||||
# set -a is REQUIRED: a sourced assignment is a shell variable, not an env var —
|
||||
# without export the entrypoint child (and its envsubst step) sees nothing and
|
||||
# the template renders unsubstituted (reproduced locally 2026-10-23: unknown
|
||||
# "gitea_contents_api" variable). The nginx command is inline: a compose
|
||||
# entrypoint override does NOT keep the image's CMD (CMD=[]) — an empty "$@"
|
||||
# makes the exec a no-op, exit 0, restart loop.
|
||||
entrypoint: ["sh", "-c", "set -a; . /run/secrets/site_config; exec /docker-entrypoint.sh nginx -g 'daemon off;'"]
|
||||
environment:
|
||||
# Names the variables the template renderer substitutes. The filter is a
|
||||
# REGEX the official entrypoint matches against each variable name
|
||||
|
||||
Reference in new issue
Block a user