Add a start script and automatically migrate the db

This commit is contained in:
Pierre Jaury 2018-06-12 20:56:42 +02:00
parent eddeb5e788
commit b412616c28
3 changed files with 8 additions and 0 deletions

View file

@ -31,3 +31,5 @@ RUN install -d -m0755 -o www-data -g www-data \
VOLUME ["/var/www/storage"] VOLUME ["/var/www/storage"]
ENV PATH="~/.composer/vendor/bin:./vendor/bin:${PATH}" ENV PATH="~/.composer/vendor/bin:./vendor/bin:${PATH}"
CMD /var/www/docker/start.sh

6
docker/start.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
mkdir -p storage/framework/{cache,sessions,views,logs}
php artisan migrate
exec apache2-foreground