feat: add entrypoint script to run migrations on startup
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 3m31s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 3m31s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
16b4a84215
commit
a900f58c26
2 changed files with 9 additions and 1 deletions
|
|
@ -65,6 +65,8 @@ COPY --from=node-builder /app/public/build /var/www/html/public/build
|
||||||
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
||||||
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||||
COPY docker/php.ini /usr/local/etc/php/conf.d/app.ini
|
COPY docker/php.ini /usr/local/etc/php/conf.d/app.ini
|
||||||
|
COPY docker/entrypoint.sh /entrypoint.sh
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
# Set up storage and cache directories
|
# Set up storage and cache directories
|
||||||
RUN mkdir -p \
|
RUN mkdir -p \
|
||||||
|
|
@ -82,4 +84,4 @@ RUN rm -f .env .env.* 2>/dev/null || true
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
|
||||||
6
docker/entrypoint.sh
Normal file
6
docker/entrypoint.sh
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
php artisan migrate --force
|
||||||
|
|
||||||
|
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
|
||||||
Loading…
Reference in a new issue