docker setup for nextcloud https://home.thurloat.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
nextcloud-docker/docker-compose.yml

109 lines
2.2 KiB

version: '3'
services:
db:
image: postgres:11-alpine
restart: always
volumes:
- db:/var/lib/postgresql/data
env_file:
- env/db
app:
image: nextcloud:fpm-alpine
dns: 8.8.8.8
restart: always
volumes:
- nextcloud:/var/www/html
env_file:
- env/db
depends_on:
- db
web:
build: ./web
restart: always
volumes:
- nextcloud:/var/www/html:ro
env_file:
- env/web
depends_on:
- app
networks:
- proxy-tier
- default
cron:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
depends_on:
- app
entrypoint: |
sh -c 'sh -s <<EOF
trap "break;exit" SIGHUP SIGINT SIGTERM
while /bin/true; do
echo Starting cron
su -s "/bin/sh" -c "/usr/local/bin/php /var/www/html/cron.php" www-data
echo \$$(date) - Running cron finished
sleep 900
done
EOF'
thumbnailer:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
depends_on:
- app
entrypoint: |
sh -c 'sh -s <<EOF
trap "break;exit" SIGHUP SIGINT SIGTERM
while /bin/true; do
echo Starting thumbnail cron
su -s "/bin/sh" -c "/usr/local/bin/php occ preview:pre-generate" www-data
echo \$$(date) - Running thumbnail cron finished
sleep 60
done
EOF'
proxy:
build: ./proxy
restart: always
ports:
- 80:80
- 443:443
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
volumes:
- certs:/etc/nginx/certs:ro
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- proxy-tier
letsencrypt-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
restart: always
volumes:
- certs:/etc/nginx/certs
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- proxy-tier
depends_on:
- proxy
volumes:
db:
nextcloud:
certs:
vhost.d:
html:
networks:
proxy-tier: