Updates to docker build
This commit is contained in:
parent
c2c08db342
commit
da5e3b538d
@ -1,4 +1,4 @@
|
||||
FROM php:8.2-apache
|
||||
FROM php:8.3-apache
|
||||
|
||||
RUN apt update && \
|
||||
apt upgrade -y && \
|
||||
@ -45,10 +45,13 @@ RUN rm -rf /var/www/html/tests
|
||||
RUN rm -rf /var/www/html/translations
|
||||
|
||||
RUN COMPOSER_ALLOW_SUPERUSER=1 composer install --no-scripts --no-dev --optimize-autoloader
|
||||
RUN mv /var/www/html/data/data.db /var/www/html/var/
|
||||
RUN mkdir /data
|
||||
RUN chown -R 33:33 /data
|
||||
RUN chmod -R 755 /data
|
||||
COPY data/data.db /data/data.db
|
||||
|
||||
RUN mkdir /var/www/html/var/cache
|
||||
RUN mkdir /var/www/html/var/log
|
||||
|
||||
RUN chown -R www-data:www-data /var/www/html
|
||||
RUN chown -R 33:33 /var/www/html
|
||||
RUN chmod -R 755 /var/www/html
|
@ -5,4 +5,6 @@ services:
|
||||
container_name: sermon-notes
|
||||
image: ryanprather/sermon-notes:latest
|
||||
ports:
|
||||
- 80:80
|
||||
- 80:80
|
||||
volumes:
|
||||
- ./data:/data
|
@ -10,8 +10,10 @@ 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
|
||||
echo "DATABASE_URL=\"sqlite:///%kernel.project_dir%/var/data.db\"" >> .env
|
||||
echo "DATABASE_URL=\"sqlite:///data/data.db\"" >> .env
|
||||
echo "MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0" >> .env
|
||||
|
||||
symfony console doctrine:migrations:migrate --no-interaction
|
||||
COMPOSER_ALLOW_SUPERUSER=1 composer update
|
||||
symfony console doctrine:migrations:migrate --no-interaction
|
||||
|
||||
chown -R www-data:www-data /data
|
||||
|
Loading…
Reference in New Issue
Block a user