summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile13
1 files changed, 9 insertions, 4 deletions
diff --git a/Dockerfile b/Dockerfile
index 2a31b2a..9309d26 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -30,16 +30,21 @@ RUN a2enmod rewrite
30RUN echo "upload_max_filesize = 50M" > /usr/local/etc/php/conf.d/sent-web.ini \ 30RUN echo "upload_max_filesize = 50M" > /usr/local/etc/php/conf.d/sent-web.ini \
31 && echo "post_max_size = 50M" >> /usr/local/etc/php/conf.d/sent-web.ini 31 && echo "post_max_size = 50M" >> /usr/local/etc/php/conf.d/sent-web.ini
32 32
33# copy entrypoint script
34COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
35RUN chmod +x /usr/local/bin/docker-entrypoint.sh
36
33# copy application 37# copy application
34COPY src/ /var/www/html/src/ 38COPY src/ /var/www/html/src/
35 39
36# ensure uploads directory exists with correct permissions 40# stash a seed copy of uploads so the entrypoint can populate a fresh volume
37RUN mkdir -p /var/www/html/src/uploads \ 41RUN mkdir -p /opt/uploads-seed \
38 && chown -R www-data:www-data /var/www/html/src/uploads 42 && cp -r /var/www/html/src/uploads/. /opt/uploads-seed/ \
43 && chown -R www-data:www-data /var/www/html/src/uploads /opt/uploads-seed
39 44
40EXPOSE 3000 45EXPOSE 3000
41 46
42# tini as PID 1 ensures SIGTERM is properly forwarded to apache, 47# tini as PID 1 ensures SIGTERM is properly forwarded to apache,
43# preventing the 'permission denied' error on docker stop 48# preventing the 'permission denied' error on docker stop
44ENTRYPOINT ["/usr/bin/tini", "--"] 49ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/docker-entrypoint.sh"]
45CMD ["apache2-foreground"] \ No newline at end of file 50CMD ["apache2-foreground"] \ No newline at end of file