feat: debug print at nextjs container start

This commit is contained in:
theoleuthardt 2025-02-28 11:47:55 +01:00
parent 1ef7f9f822
commit 2dad778d0e
3 changed files with 9 additions and 5 deletions

View file

@ -49,7 +49,7 @@ jobs:
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/werkzeugkiste-backend:latest
build-args: |
CORS_ALLOWED_ORIGIN=${{ secrets.CORS_ALLOWED_ORIGIN }}
CORS_ALLOWED_ORIGIN=${{ secrets.CORS_ALLOWED_ORIGIN }}
deploy-on-server:
needs: docker-build-push

View file

@ -60,8 +60,9 @@ USER nextjs
EXPOSE 3000
ENV PORT=3000
# server.js is created by next build from the standalone output
# https://nextjs.org/docs/pages/api-reference/config/next-config-js/output
ENV HOSTNAME="0.0.0.0"
CMD ["node", "server.js"]
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
CMD ["/entrypoint.sh"]

3
frontend/entrypoint.sh Normal file
View file

@ -0,0 +1,3 @@
#!/bin/sh
echo "NEXT_PUBLIC_BACKEND_URL: $NEXT_PUBLIC_BACKEND_URL"
exec node server.js