mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
chore(deploy): auth-protected /api/content/ proxy with Gitea token passthrough
nginx template location with basic auth (deploy/htpasswd) + envsubst'd GITEA_TOKEN; compose mounts template + htpasswd; vite dev proxy mirrors nginx exactly for edit-mode development.
This commit is contained in:
1 parent
e6b4d83084
commit
f113dfc7b5
4 files changed
+47
-1
No files matched your search
+11
-1
@@ -3,9 +3,19 @@ services:
|
||||
image: nginx:alpine
|
||||
container_name: dong-site
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
# The write token for the /api/content/ proxy (spec-v4 §6.2). Set it in
|
||||
# the local .env; NGINX_ENVSUBST_FILTER restricts the template
|
||||
# substitution to this variable only, so $uri/$host stay nginx runtime
|
||||
# variables.
|
||||
GITEA_TOKEN: ${GITEA_TOKEN}
|
||||
NGINX_ENVSUBST_FILTER: GITEA_TOKEN
|
||||
volumes:
|
||||
- ./dist:/usr/share/nginx/html:ro
|
||||
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
# Mounted as a template: the image's envsubst step renders it to
|
||||
# /etc/nginx/conf.d/default.conf with GITEA_TOKEN filled in.
|
||||
- ./nginx.conf:/etc/nginx/templates/default.conf.template:ro
|
||||
- ./deploy/htpasswd:/etc/nginx/htpasswd:ro
|
||||
networks:
|
||||
- docker-network
|
||||
networks:
|
||||
|
||||
Reference in new issue
Block a user