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

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
PeterChrz 2026-04-01 00:26:39 -04:00
parent 16b4a84215
commit a900f58c26
Signed by untrusted user who does not match committer: pch
GPG key ID: 8F0826ECF7302C63
2 changed files with 9 additions and 1 deletions

View file

@ -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/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
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
RUN mkdir -p \
@ -82,4 +84,4 @@ RUN rm -f .env .env.* 2>/dev/null || true
EXPOSE 80
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
ENTRYPOINT ["/entrypoint.sh"]

6
docker/entrypoint.sh Normal file
View file

@ -0,0 +1,6 @@
#!/bin/sh
set -e
php artisan migrate --force
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf