diff --git a/nextcloud/Containerfile b/nextcloud/Containerfile index d35e3e5..11aa188 100644 --- a/nextcloud/Containerfile +++ b/nextcloud/Containerfile @@ -7,8 +7,8 @@ FROM localhost/debian # -p (port) and -v (volume) both go host:container LABEL config_default="\ -p 9080:80 \ --v /srv/vol/nextcloud/files:/vol/files \ --v /srv/vol/nextcloud/data:/vol/data +-v $HOME/vol/nextcloud/files:/vol/files \ +-v $HOME/vol/nextcloud/data:/vol/data \ --shm-size=1g" # Build Variables @@ -66,12 +66,12 @@ RUN mv php/php.ini /etc/php/${PHPV:?}/fpm/ && \ ### # configure PostgreSQL -COPY --chown=postgres:postgres assets/postgresql ./ +COPY --chown=postgres:postgres assets/postgresql/ postgresql/ # If the posgresql.conf file contains multiple entries for the same parameter, all but the last one is ignored. # So we can just append our settings to the already-existing postgresql.conf file. -RUN mv postgresql/pg_hba.conf /etc/postgresql/${PSQLV:?}/main/ & \ - cat postgresql/postgresql.conf >> /etc/postgresql/${PSQLV:?}/main/postgresql.conf - +RUN mv postgresql/pg_hba.conf /etc/postgresql/${PSQLV:?}/main/ && \ + cat postgresql/postgresql.conf >> /etc/postgresql/${PSQLV:?}/main/postgresql.conf && \ + rm -rf postgresql ### @@ -101,12 +101,16 @@ RUN usermod -a -G redis www-data ### # download nextcloud +COPY assets/nextcloud/ ./ +RUN test -f latest.zip || \ + wget --progress=dot:giga https://download.nextcloud.com/server/releases/latest.zip + + WORKDIR /var/www/html -RUN wget --progress=dot:giga https://download.nextcloud.com/server/releases/latest.zip && \ - echo "Unzipping ..." && \ - unzip -q latest.zip && \ +RUN echo "Unzipping ..." && \ + unzip -q $HOME/latest.zip && \ chown -R www-data:www-data nextcloud && \ - rm latest.zip + rm $HOME/latest.zip # create data dir for nextcloud RUN mkdir -p /vol/files && \