Fix Dockerimage

Signed-off-by: Andrea Pavone <info@andreapavone.com>
This commit is contained in:
2024-11-11 22:35:49 +01:00
parent 6b64889a09
commit 8086eafe06
2 changed files with 10 additions and 2 deletions

View File

@ -15,7 +15,11 @@ RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-av
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
COPY . /var/www/html
COPY --chown=www-data:www-data . /var/www/html
WORKDIR /var/www/html
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
RUN apt-get update && apt-get install -y \
curl \
@ -28,5 +32,9 @@ RUN apt-get update && apt-get install -y \
RUN docker-php-ext-install mbstring exif pcntl bcmath gd
# Install dependencies
USER www-data
RUN composer install
RUN php artisan migrate --force
USER root
COPY --from=assets --chown=www-data:www-data /app /var/www/html

View File

@ -5,7 +5,7 @@ services:
context: .
dockerfile: Dockerfile
ports:
- "127.0.0.1:8000:8080"
- "127.0.0.1:8000:80"
environment:
- APP_ENV=production
- APP_URL="https://asm.pavo.pw"