docker
This commit is contained in:
@@ -32,7 +32,7 @@ RUN apk add --no-cache \
|
||||
oniguruma-dev \
|
||||
icu-dev \
|
||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \
|
||||
&& docker-php-ext-install \
|
||||
&& docker-php-ext-install -j$(nproc) \
|
||||
pdo_mysql \
|
||||
mbstring \
|
||||
gd \
|
||||
@@ -70,7 +70,9 @@ RUN chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cac
|
||||
COPY docker/nginx/default.conf /etc/nginx/http.d/default.conf
|
||||
COPY docker/php/php.ini $PHP_INI_DIR/conf.d/app.ini
|
||||
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
COPY docker/entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|
||||
CMD ["/entrypoint.sh"]
|
||||
|
||||
7
docker/entrypoint.sh
Normal file
7
docker/entrypoint.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
echo "Running database migrations..."
|
||||
php artisan migrate --force --no-interaction
|
||||
|
||||
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
|
||||
Reference in New Issue
Block a user