forked from catalin/fukuops
feat: add nextcloud dockerfiles
This commit is contained in:
parent
f5ee3353fa
commit
156e84bf20
4 changed files with 115 additions and 1 deletions
62
docker/nextcloud/Dockerfile
Normal file
62
docker/nextcloud/Dockerfile
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
FROM nextcloud:29.0.4-apache
|
||||
|
||||
RUN set -ex; \
|
||||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ffmpeg \
|
||||
ghostscript \
|
||||
libmagickcore-6.q16-6-extra \
|
||||
procps \
|
||||
smbclient \
|
||||
supervisor \
|
||||
vim \
|
||||
clamav \
|
||||
sudo \
|
||||
; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN set -ex; \
|
||||
\
|
||||
savedAptMark="$(apt-mark showmanual)"; \
|
||||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
libbz2-dev \
|
||||
libc-client-dev \
|
||||
libkrb5-dev \
|
||||
libsmbclient-dev \
|
||||
; \
|
||||
\
|
||||
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
|
||||
docker-php-ext-install \
|
||||
bz2 \
|
||||
imap \
|
||||
; \
|
||||
pecl install smbclient; \
|
||||
docker-php-ext-enable smbclient; \
|
||||
\
|
||||
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
||||
apt-mark auto '.*' > /dev/null; \
|
||||
apt-mark manual $savedAptMark; \
|
||||
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
|
||||
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \
|
||||
| sort -u \
|
||||
| xargs -r dpkg-query --search \
|
||||
| cut -d: -f1 \
|
||||
| sort -u \
|
||||
| xargs -rt apt-mark manual; \
|
||||
\
|
||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir -p \
|
||||
/var/log/supervisord \
|
||||
/var/run/supervisord \
|
||||
;
|
||||
|
||||
COPY supervisord.conf /
|
||||
|
||||
ENV NEXTCLOUD_UPDATE=1
|
||||
|
||||
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
|
||||
31
docker/nextcloud/docker-compose.yml
Normal file
31
docker/nextcloud/docker-compose.yml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
services:
|
||||
imaginary:
|
||||
image: nextcloud/aio-imaginary:latest
|
||||
cap_add:
|
||||
- SYS_NICE
|
||||
volumes:
|
||||
- type: tmpfs
|
||||
target: /tmp:exec
|
||||
environment:
|
||||
- TZ=Europe/Madrid
|
||||
networks:
|
||||
- nextcloud
|
||||
|
||||
nextcloud:
|
||||
build: .
|
||||
volumes:
|
||||
- /mnt/nas1/legacy-storage/cloud/cloud/data:/var/www/html/data
|
||||
- /mnt/nas1/legacy-storage/cloud/cloud/config:/var/www/html/config
|
||||
- /mnt/nas1/legacy-storage/cloud/cloud/custom_apps:/var/www/html/custom_apps
|
||||
- /mnt/nas1/legacy-storage/cloud/cloud/apps:/var/www/html/apps
|
||||
- type: tmpfs
|
||||
target: /tmp:exec
|
||||
environment:
|
||||
PHP_MEMORY_LIMIT: ${PHP_MEMORY_LIMIT:-2048M}
|
||||
NEXTCLOUD_INIT_HTACCESS: ${NEXTCLOUD_INIT_HTACCESS:-1}
|
||||
networks:
|
||||
- nextcloud
|
||||
|
||||
networks:
|
||||
nextcloud: {}
|
||||
22
docker/nextcloud/supervisord.conf
Normal file
22
docker/nextcloud/supervisord.conf
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
[supervisord]
|
||||
nodaemon=true
|
||||
logfile=/var/log/supervisord/supervisord.log
|
||||
pidfile=/var/run/supervisord/supervisord.pid
|
||||
childlogdir=/var/log/supervisord/
|
||||
logfile_maxbytes=50MB ; maximum size of logfile before rotation
|
||||
logfile_backups=10 ; number of backed up logfiles
|
||||
loglevel=error
|
||||
|
||||
[program:apache2]
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
command=apache2-foreground
|
||||
|
||||
[program:cron]
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
command=/cron.sh
|
||||
|
|
@ -27,7 +27,6 @@ services:
|
|||
- ${PAPERLESS_MEDIA:-/mnt/nas1/shared/paperless/media}:/usr/src/paperless/media
|
||||
- ${PAPERLESS_EXPORT:-/mnt/nas1/shared/paperless/export}:/usr/src/paperless/export
|
||||
- ${PAPERLESS_CONSUME:-/mnt/nas1/shared/paperless/consume}:/usr/src/paperless/consume
|
||||
|
||||
environment:
|
||||
USERMAP_UID: ${PAPERLESS_UID:-1000}
|
||||
USERMAP_GID: ${PAPERLESS_GID:-1000}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue