Skip to content

Instantly share code, notes, and snippets.

@SnowMB
Last active November 9, 2019 20:42
Show Gist options
  • Save SnowMB/758bb6c993372111629f4e86c0e1de1a to your computer and use it in GitHub Desktop.
Save SnowMB/758bb6c993372111629f4e86c0e1de1a to your computer and use it in GitHub Desktop.
nextcloud_nginx_letsencrypt_mariadb
version: '2'
services:
nginx:
image: jwilder/nginx-proxy
container_name: nginx
ports:
- 80:80
- 443:443
volumes:
- ./proxy/conf.d:/etc/nginx/conf.d
- ./proxy/vhost.d:/etc/nginx/vhost.d
- ./proxy/html:/usr/share/nginx/html
- ./proxy/certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- proxy-tier
letsencrypt-nginx-proxy-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt-companion
depends_on: [nginx]
volumes_from:
- nginx
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./proxy/certs:/etc/nginx/certs:rw
nextcloud:
image: wonderfall/nextcloud
container_name: nextcloud
links:
- db_nextcloud:db_nextcloud
environment:
- UID=1000
- GID=1000
volumes:
- ./nextcloud/data:/data
- ./nextcloud/config:/config
- ./nextcloud/apps:/apps2
environment:
- VIRTUAL_HOST=
- LETSENCRYPT_HOST=
- LETSENCRYPT_EMAIL=
depends_on:
- letsencrypt-nginx-proxy-companion
networks:
- proxy-tier
db_nextcloud:
image: mariadb:10
container_name: db_nextcloud
volumes:
- ./nextcloud/db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=ROOTPASSWORD
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=USERPASSWORD
depends_on:
- letsencrypt-nginx-proxy-companion
networks:
- proxy-tier
networks:
proxy-tier:
external:
name: nginx-proxy
@tinsjourney
Copy link

are you sure you can put the "environment" word twice like you did on line 36 and line 43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment