Fixed prod api url

This commit is contained in:
Tim Lappe 2025-04-26 19:06:23 +02:00
parent a86890da2b
commit d06381ff2a
2 changed files with 15 additions and 2 deletions

View File

@ -64,11 +64,13 @@ FROM builder AS prod
WORKDIR /var/www/html
COPY --chmod=755 docker/entrypoint.prod.sh /entrypoint.prod.sh
COPY . .
COPY docker/nginx/default.conf /etc/nginx/sites-enabled/default
RUN cd backend && composer install
RUN cd backend && composer install && bin/console doctrine:migrations:migrate
RUN cd frontend && npm install && npm run build
# Set entrypoint
ENTRYPOINT ["/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.prod.sh"]

11
docker/entrypoint.prod.sh Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
set -e
# Start PHP-FPM service
service php8.4-fpm start
# Change to frontend directory and start npm in background
cd /var/www/html/frontend && export REACT_APP_API_URL=https://calendi.strolap.com && npm run start &
# Start Nginx in foreground to keep container running
exec nginx -g 'daemon off;'