Skip to content

Instantly share code, notes, and snippets.

@iamcryptoki
Created July 6, 2018 08:28
Show Gist options
  • Save iamcryptoki/f56ec8af05cebed39fad40f718e393cf to your computer and use it in GitHub Desktop.
Save iamcryptoki/f56ec8af05cebed39fad40f718e393cf to your computer and use it in GitHub Desktop.
Docker Compose file for my Nextcloud installation.
version: '3'
volumes:
nextcloud:
db:
services:
db:
image: mariadb
env_file:
- .env
restart: always
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
app:
image: nextcloud:${NEXTCLOUD_VERSION}
env_file:
- .env
ports:
- 8081:80
links:
- db
volumes:
- nextcloud:/var/www/html
- ./data:/var/www/html/data:rw
environment:
- NEXTCLOUD_ADMIN_USER=${NEXTCLOUD_ADMIN_USER}
- NEXTCLOUD_ADMIN_PASSWORD=${NEXTCLOUD_ADMIN_PASSWORD}
- NEXTCLOUD_TABLE_PREFIX=${NEXTCLOUD_TABLE_PREFIX}
- NEXTCLOUD_DATA_DIR=${NEXTCLOUD_DATA_DIR}
restart: always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment