Update docker build file
This commit is contained in:
parent
591f80c288
commit
2c2381a0f1
15
Dockerfile
15
Dockerfile
@ -2,8 +2,9 @@ FROM php:8.2-apache
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
RUN apt update && \
|
||||
apt upgrade -y && \
|
||||
apt install -y \
|
||||
libzip-dev \
|
||||
unzip \
|
||||
libonig-dev \
|
||||
@ -38,12 +39,14 @@ RUN curl -sS https://get.symfony.com/cli/installer | bash && \
|
||||
|
||||
COPY 000-default.conf /etc/apache2/sites-available/
|
||||
|
||||
COPY composer.lock composer.json ./
|
||||
COPY composer.lock composer.json /var/www/html/
|
||||
|
||||
RUN composer install --no-scripts --no-dev --optimize-autoloader
|
||||
|
||||
COPY . .
|
||||
COPY . /var/www/html/
|
||||
RUN rm /var/www/html/.env*
|
||||
|
||||
EXPOSE 80
|
||||
RUN cp /var/www/html/data/data.db /var/www/html/var/
|
||||
|
||||
CMD ["apache2-foreground"]
|
||||
RUN chown -R www-data:www-data /var/www/html
|
||||
RUN chmod -R 755 /var/www/html
|
@ -5,3 +5,7 @@ LENGTH=32
|
||||
SECRET_KEY=$(openssl rand -base64 $LENGTH | tr -d '=' | tr -d '+' | tr -d '/' | tr -d ' ')
|
||||
TRIMMED_KEY=$(cut -c1-32 <<< $SECRET_KEY)
|
||||
echo "APP_SECRET=$TRIMMED_KEY" > .env.local
|
||||
echo "APP_ENV=prod" >> .env.local
|
||||
echo "APP_DEBUG=0" >> .env.local
|
||||
echo "DATABASE_URL=\"sqlite:///%kernel.project_dir%/var/data.db\"" >> .env.local
|
||||
echo "MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0" >> .env.local
|
||||
|
Loading…
Reference in New Issue
Block a user