Added a custom docker entrypoint which chowns used volumes

This fixes issue #206.
This commit is contained in:
Jan Böhmer 2023-02-04 22:44:33 +01:00
parent f0947fd948
commit 6f28029fb8
2 changed files with 50 additions and 2 deletions

View file

@ -55,5 +55,10 @@ ENV DATABASE_URL="sqlite:///%kernel.project_dir%/uploads/app.db"
USER root
VOLUME ["/var/www/html/uploads", "/var/www/html/public/media"]
EXPOSE 80
# Copy entrypoint to /usr/local/bin and make it executable
RUN cp ./.docker/partdb-entrypoint.sh /usr/local/bin/partdb-entrypoint.sh && chmod +x /usr/local/bin/partdb-entrypoint.sh
ENTRYPOINT ["partdb-entrypoint.sh", "docker-php-entrypoint"]
CMD ["apache2-foreground"]
EXPOSE 80
VOLUME ["/var/www/html/uploads", "/var/www/html/public/media"]