Last active
December 3, 2020 10:34
-
-
Save dnburgess/241baa2711aeeb542a09511a02b4468e to your computer and use it in GitHub Desktop.
My NextCloud Stack Setup w/ Notes at the end
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: '2' | |
volumes: | |
nextcloud: | |
db: | |
services: | |
db: | |
image: mariadb | |
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW | |
restart: unless-stopped | |
volumes: | |
- db:/var/lib/mysql | |
environment: | |
- MYSQL_ROOT_PASSWORD=r00tP@55w0rd | |
- MYSQL_PASSWORD=My5qLP@55w0rd | |
- MYSQL_DATABASE=nextcloud | |
- MYSQL_USER=nextcloud | |
app: | |
image: nextcloud | |
links: | |
- db | |
volumes: | |
- /path/to/storage/on/your/server:/var/www/html | |
labels: | |
- traefik.enable=true | |
- traefik.http.routers.nextcloud.entrypoints=web | |
- traefik.http.routers.nextcloud.rule=Host(`cloud.yoursite.com`) | |
- traefik.http.services.nextcloud.loadbalancer.server.port=80 | |
restart: unless-stopped | |
Change the first half of the volumes | |
Change the passwords to your choosing | |
Change the URL on line 29 to be YOUR URL | |
Deploy the container | |
Edit the container | |
Change the network of the container to "web" after it launches | |
Re-deploy the container | |
Go to your NextCloud URL | |
Select the MySQL option for the database | |
When you're installing, make sure you change the database setting from 'localhost' to 'db' (no quotes) | |
You'll enter the database username, and MySQL database password above into the appropriate spots | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment