Skip to content

Instantly share code, notes, and snippets.

@awade
Last active May 20, 2018 20:52
Show Gist options
  • Save awade/95be5f7a5c744c8c77544e81b7ae32c5 to your computer and use it in GitHub Desktop.
Save awade/95be5f7a5c744c8c77544e81b7ae32c5 to your computer and use it in GitHub Desktop.
Nextcloud docker compose with exposed port, works with jwilder/nginx-proxy and jrcs/letsencrypt-nginx-proxy-companion for SSL/TLS secure access.
version: '2'
volumes:
nextcloud:
nextcloudDB:
services:
db:
image: mariadb
restart: always
volumes:
- nextcloudDB:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=<really secure pass>
- MYSQL_PASSWORD=<database password>
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
network_mode: bridge
app:
image: nextcloud
links:
- db
ports:
- 8080:80
volumes:
- nextcloud:/var/www/html
environment:
- VIRTUAL_HOST=nextcloud.example.com
- LETSENCRYPT_HOST=nextcloud.example.com
- MYSQL_HOST=db
depends_on:
- db
network_mode: bridge
restart: always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment