Created
January 10, 2021 14:53
-
-
Save Staubgeborener/e66b5beb6e44c3403be897c4e3d450cf to your computer and use it in GitHub Desktop.
docker-compose for nextcloud, proxy, lets encrypt and mariadb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
proxy: | |
image: jwilder/nginx-proxy:alpine | |
labels: | |
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true" | |
container_name: nextcloud-proxy | |
networks: | |
- nextcloud_network | |
ports: | |
- 80:80 | |
- 443:443 | |
volumes: | |
- ./proxy/conf.d:/etc/nginx/conf.d:rw | |
- ./proxy/vhost.d:/etc/nginx/vhost.d:rw | |
- ./proxy/html:/usr/share/nginx/html:rw | |
- ./proxy/certs:/etc/nginx/certs:ro | |
- /etc/localtime:/etc/localtime:ro | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
restart: unless-stopped | |
letsencrypt: | |
image: jrcs/letsencrypt-nginx-proxy-companion | |
container_name: nextcloud-letsencrypt | |
depends_on: | |
- proxy | |
networks: | |
- nextcloud_network | |
volumes: | |
- ./proxy/certs:/etc/nginx/certs:rw | |
- ./proxy/vhost.d:/etc/nginx/vhost.d:rw | |
- ./proxy/html:/usr/share/nginx/html:rw | |
- /etc/localtime:/etc/localtime:ro | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
restart: unless-stopped | |
db: | |
image: mariadb | |
container_name: nextcloud-mariadb | |
networks: | |
- nextcloud_network | |
volumes: | |
- /srv/docker-persist/MariaDB/nextcloud-sql:/var/lib/mysql | |
- /etc/localtime:/etc/localtime:ro | |
environment: | |
- MYSQL_ROOT_PASSWORD=R00T_P4SSW0RD | |
- MYSQL_PASSWORD=P4SSW0RD | |
- MYSQL_DATABASE=DATABASE | |
- MYSQL_USER=USER | |
restart: unless-stopped | |
app: | |
image: nextcloud:latest | |
container_name: nextcloud-app | |
networks: | |
- nextcloud_network | |
depends_on: | |
- letsencrypt | |
- proxy | |
- db | |
volumes: | |
- nextcloud:/var/www/html | |
- ./app/config:/var/www/html/config | |
- ./app/custom_apps:/var/www/html/custom_apps | |
- ./storage:/var/www/html/data | |
- ./app/themes:/var/www/html/themes | |
- /etc/localtime:/etc/localtime:ro | |
environment: | |
- VIRTUAL_HOST=subdomain.domain.tld | |
- LETSENCRYPT_HOST=subdomain.domain.tld | |
- [email protected] | |
restart: unless-stopped |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment