Fixed prod api url
This commit is contained in:
parent
a86890da2b
commit
e5d2153918
@ -64,6 +64,8 @@ FROM builder AS prod
|
|||||||
|
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
|
COPY --chmod=755 docker/entrypoint.prod.sh /entrypoint.prod.sh
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY docker/nginx/default.conf /etc/nginx/sites-enabled/default
|
COPY docker/nginx/default.conf /etc/nginx/sites-enabled/default
|
||||||
|
|
||||||
@ -71,4 +73,4 @@ RUN cd backend && composer install
|
|||||||
RUN cd frontend && npm install && npm run build
|
RUN cd frontend && npm install && npm run build
|
||||||
|
|
||||||
# Set entrypoint
|
# Set entrypoint
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.prod.sh"]
|
||||||
|
|||||||
13
docker/entrypoint.prod.sh
Normal file
13
docker/entrypoint.prod.sh
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#!/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 &
|
||||||
|
|
||||||
|
cd /var/www/html/backend && bin/console doctrine:migrations:migrate
|
||||||
|
|
||||||
|
# Start Nginx in foreground to keep container running
|
||||||
|
exec nginx -g 'daemon off;'
|
||||||
Loading…
x
Reference in New Issue
Block a user