Changeset 0.6.0 (#36)
This commit is contained in:
@@ -5,6 +5,11 @@
|
||||
# in k8s, the Ingress routes /api/ and /ws to
|
||||
# the backend service directly.
|
||||
#
|
||||
# Supports path-based deployment via BASE_PATH
|
||||
# env var (e.g. /dev, /test, or empty for root).
|
||||
# The entrypoint generates the nginx config and
|
||||
# injects BASE_PATH into index.html at startup.
|
||||
#
|
||||
# Build context: repo root
|
||||
# ==========================================
|
||||
|
||||
@@ -18,14 +23,21 @@ RUN npm pack marked@16.3.0 dompurify@3.2.4 2>/dev/null && \
|
||||
tar xzf dompurify-*.tgz -C /tmp && cp /tmp/package/dist/purify.min.js /vendor/purify.min.js && \
|
||||
rm -rf /tmp/package /tmp/*.tgz
|
||||
|
||||
# Stage 2: nginx
|
||||
# Stage 2: nginx + entrypoint
|
||||
FROM nginx:1-alpine
|
||||
|
||||
COPY nginx.frontend.conf /etc/nginx/conf.d/default.conf
|
||||
# Remove default config — entrypoint generates it
|
||||
RUN rm -f /etc/nginx/conf.d/default.conf
|
||||
|
||||
COPY src/ /usr/share/nginx/html/
|
||||
COPY --from=vendor /vendor/ /usr/share/nginx/html/vendor/
|
||||
COPY docker-entrypoint-fe.sh /docker-entrypoint-fe.sh
|
||||
RUN chmod +x /docker-entrypoint-fe.sh
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||
CMD wget --no-verbose --tries=1 --spider http://localhost/ || exit 1
|
||||
CMD wget --no-verbose --tries=1 --spider http://localhost/healthz 2>/dev/null || \
|
||||
wget --no-verbose --tries=1 --spider http://localhost/ || exit 1
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint-fe.sh"]
|
||||
|
||||
Reference in New Issue
Block a user