add migrations

This commit is contained in:
2023-01-22 10:59:24 +03:30
parent 954aedbe9b
commit 23b90b6f54
2 changed files with 9 additions and 1 deletions

View File

@@ -48,5 +48,6 @@ WORKDIR /app
RUN chown -R octane:octane . RUN chown -R octane:octane .
EXPOSE 80 EXPOSE 80
COPY ./supervisord.conf /etc/supervisord.conf COPY ./supervisord.conf /etc/supervisord.conf
ENTRYPOINT ["supervisord", "--nodaemon", "--configuration", "/etc/supervisord.conf"] COPY ./entrypoint.sh /etc/entrypoint.sh
ENTRYPOINT ["/etc/entrypoint.sh"]
HEALTHCHECK --start-period=5s --interval=2s --timeout=5s --retries=8 CMD php artisan octane:status || exit 1 HEALTHCHECK --start-period=5s --interval=2s --timeout=5s --retries=8 CMD php artisan octane:status || exit 1

7
entrypoint.sh Normal file
View File

@@ -0,0 +1,7 @@
php artisan migrate --force
php artisan optimize:clear
php artisan package:discover --ansi
php artisan event:cache
php artisan config:cache
php artisan route:cache
exec supervisord --configuration /etc/supervisord.conf