Change entrypoint
This commit is contained in:
parent
9c9fc2de67
commit
81bbc15107
4
frontend/10-generate-env.sh
Normal file
4
frontend/10-generate-env.sh
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Generate env.js from the template
|
||||
envsubst < /etc/env/env.js.template > /usr/share/nginx/html/env.js
|
||||
@ -15,16 +15,15 @@ RUN apk add --no-cache dos2unix
|
||||
# Copy built app
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
||||
# ✅ Move the env.js.template to separate folder
|
||||
# ✅ Copy env.js.template
|
||||
COPY public/env.js.template /etc/env/env.js.template
|
||||
|
||||
# Copy nginx config
|
||||
# ✅ Copy nginx config
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Copy entrypoint
|
||||
COPY docker-entrypoint.sh /entrypoint.sh
|
||||
RUN dos2unix /entrypoint.sh && chmod +x /entrypoint.sh
|
||||
# ✅ Add env generator script to nginx entrypoint hook
|
||||
COPY 10-generate-env.sh /docker-entrypoint.d/10-generate-env.sh
|
||||
RUN dos2unix 10-generate-env.sh && chmod +x /docker-entrypoint.d/10-generate-env.sh
|
||||
|
||||
EXPOSE 80
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user