Skip to content

Instantly share code, notes, and snippets.

@Skn0tt Skn0tt/docker-compose.yml
Last active Oct 10, 2019

Embed
What would you like to do?
Green Nextcloud Docker-Compose
version: "3.7"
services:
nextcloud:
restart: unless-stopped
image: nextcloud
depends_on:
- minio
- postgres
- redis
environment:
NEXTCLOUD_ADMIN_USER: put_in_your_admin_user
NEXTCLOUD_ADMIN_PASSWORD: put_in_your_admin_password
NEXTCLOUD_TRUSTED_DOMAINS: put_in_your_the_domain
REDIS_HOST: redis
POSTGRES_HOST: postgres
POSTGRES_DB: nextcloud
POSTGRES_USER: nextcloud
POSTGRES_PASSWORD: pgpassword
volumes:
- ./s3.config.php:/var/www/html/config/s3.config.php
labels:
- "traefik.port=80"
- "traefik.frontend.rule=Host:put_in_your_the_domain"
- "traefik.enable=true"
postgres:
image: postgres
restart: unless-stopped
environment:
POSTGRES_USER: nextcloud
POSTGRES_PASSWORD: pgpassword
POSTGRES_DB: nextcloud
pgbackup:
image: schickling/postgres-backup-s3
depends_on:
- postgres
environment:
SCHEDULE: '@hourly'
S3_REGION: local
S3_ACCESS_KEY_ID: put_in_your_access_key
S3_SECRET_ACCESS_KEY: put_in_your_secret_key
S3_BUCKET: put_in_a_unique_bucket_name
S3_ENDPOINT: http://minio:9000
POSTGRES_HOST: postgres
POSTGRES_USER: nextcloud
POSTGRES_PASSWORD: pgpassword
POSTGRES_DATABASE: nextcloud
redis:
restart: unless-stopped
image: redis
minio:
image: minio/minio
restart: unless-stopped
command: gateway gcs
volumes:
- ./credentials.json:/credentials.json
environment:
GOOGLE_APPLICATION_CREDENTIALS: /credentials.json
MINIO_ACCESS_KEY: put_in_your_access_key
MINIO_SECRET_KEY: put_in_your_secret_key
traefik:
image: traefik
command:
- --api
- --docker
- --docker.exposedbydefault=false
- --retry
- --defaultentrypoints=https,http
- --entryPoints=Name:http Address::80 Redirect.EntryPoint:https
- --entryPoints=Name:https Address::443 TLS
- --acme.email=put_in_your_email
- --acme.entryPoint=https
- --acme.storage=acme.json
- --acme.onHostRule=true
- --acme.httpchallenge.entrypoint=http
depends_on:
- nextcloud
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /root/acme:/etc/traefik/acme
<?php
$CONFIG = array(
'objectstore' => array(
'class' => 'OC\\Files\\ObjectStore\\S3',
'arguments' => array(
'bucket' => 'nc-simonknott-de-nextcloud',
'autocreate' => true,
'key' => 'access_key',
'secret' => 'secret_key',
'hostname' => 'minio',
'port' => 9000,
'use_ssl' => false,
'region' => 'optional',
// required for some non amazon s3 implementations
'use_path_style'=>true
),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.