Updated entrypoint to automatically run dev environment migrations

This commit is contained in:
Gregory Ballantine 2024-02-26 13:17:17 -05:00
parent 987ecde7c7
commit 96a69a94ba
2 changed files with 8 additions and 1 deletions

View File

@ -22,4 +22,4 @@ VOLUME /usr/src/colossus/vendor/
EXPOSE 8080
# Run the app
CMD [ "php", "-S", "0.0.0.0:8080", "-t", "public/", "public/index.php" ]
CMD [ "bash", "entrypoints/dev.sh" ]

7
entrypoints/dev.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/sh
# run database migrations before starting
vendor/bin/phinx migrate -e development
# run the app through the PHP built-in dev server
php -S 0.0.0.0:8080 -t public/ public/index.php