diff --git a/Dockerfile b/Dockerfile index 1f756dfc9c0884e372158253fb6acf692f152245..c63dd79d9e34f789dc59e623a65791fcf51ea990 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,12 +47,11 @@ RUN case ",$EXTRAS," in \ # Install core RUN set -e; \ - mkdir -p /var/lib/aleksis/media /usr/share/aleksis/static /var/lib/aleksis/backups; \ + mkdir -p ${ALEKSIS_static__root} \ + ${ALEKSIS_media__root} \ + ${ALEKSIS_backup__location}; \ eatmydata pip install AlekSIS-Core\[$EXTRAS\]$APP_VERSION -# Declare a persistent volume for all data -VOLUME /var/lib/aleksis - # Define entrypoint and uWSGI running on port 8000 EXPOSE 8000 COPY docker-startup.sh /usr/local/bin/aleksis-docker-startup @@ -85,6 +84,12 @@ RUN set -e; \ FROM clean AS unprivileged WORKDIR /var/lib/aleksis RUN chown -R www-data:www-data \ - /var/lib/aleksis \ - /usr/share/aleksis/static + ${ALEKSIS_static__root} \ + ${ALEKSIS_media__root} \ + ${ALEKSIS_backup__location} USER www-data:www-data + +# Declare persistent volumes for all data +VOLUME ${ALEKSIS_static__root} +VOLUME ${ALEKSIS_media__root} +VOLUME ${ALEKSIS_backup__location}