Move template assets to .env-driven generation.
Site metadata, images, favicons, and YouTube settings are now configured via .env and rendered from HTML/manifest templates at dev or container startup. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+9
-6
@@ -1,19 +1,22 @@
|
||||
FROM nginx:1.27-alpine AS production
|
||||
|
||||
RUN apk add --no-cache gettext
|
||||
|
||||
# Remove default nginx config
|
||||
RUN rm /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Copy nginx config from project root
|
||||
COPY default.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Copy web files (index.html + assets)
|
||||
COPY index.html /usr/share/nginx/html/index.html
|
||||
COPY site.webmanifest /usr/share/nginx/html/site.webmanifest
|
||||
# Copy static assets
|
||||
COPY assets/ /usr/share/nginx/html/assets/
|
||||
|
||||
# Generate config.js from env vars at container start
|
||||
COPY generate-config.sh /docker-entrypoint.d/99-generate-config.sh
|
||||
RUN chmod +x /docker-entrypoint.d/99-generate-config.sh
|
||||
# Templates + generator (rendered at container start)
|
||||
COPY index.html.template site.webmanifest.template generate-from-env.sh /opt/slavic-pulse/
|
||||
RUN chmod +x /opt/slavic-pulse/generate-from-env.sh
|
||||
|
||||
COPY docker-entrypoint.sh /docker-entrypoint.d/99-generate-from-env.sh
|
||||
RUN chmod +x /docker-entrypoint.d/99-generate-from-env.sh
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
||||
Reference in New Issue
Block a user