Skip to content

Instantly share code, notes, and snippets.

@agowa
Created November 2, 2021 03:50
Show Gist options
  • Save agowa/f134a92ae8eac565bb80afd068bff620 to your computer and use it in GitHub Desktop.
Save agowa/f134a92ae8eac565bb80afd068bff620 to your computer and use it in GitHub Desktop.
Nextcloud with S3 primary storage
version: '3.7'
services:
localstack:
image: localstack/localstack
container_name: localstack_service
ports:
- "4566-4584:4566-4584"
- "8055:8080"
environment:
- SERVICES=s3
- DEBUG=1
- DATA_DIR=/tmp/localstack/data
- AWS_ACCESS_KEY_ID='ACCESSKEYAWSUSER'
- AWS_SECRET_KEY='sEcreTKey'
- AWS_BUCKET_NAME='demo-bucket'
- NODE_PORT=4000
volumes:
- ./tmp/localstack:/tmp/localstack
- /var/run/docker.sock:/var/run/docker.sock
networks:
default:
name: mock_demo
---
version: '3'
volumes:
nextcloud_apps:
nextcloud_config:
db:
nextcloud_data:
nextcloud:
services:
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --skip-innodb-read-only-compressed
restart: always
volumes:
- 'db:/var/lib/mysql'
environment:
- MYSQL_ROOT_PASSWORD=ohfai3Diek8eeziexica
- MYSQL_USER=goo8Noh9iechie6ShaBe
- MYSQL_PASSWORD=rahbiePiz0oobo2Iv9sa
- MYSQL_DATABASE=nextcloud
networks:
default:
redis:
image: redis:alpine
command: redis-server --requirepass aWeNeisaovie9lu4shoh
expose:
- 6379
deploy:
replicas: 1
update_config:
parallelism: 2
delay: 10s
restart_policy:
condition: on-failure
networks:
default:
cron:
image: nextcloud:22-apache
links:
- db
depends_on:
- db
command:
- /cron.sh
volumes:
- 'nextcloud:/var/www/html'
- 'nextcloud_apps:/var/www/html/custom_apps'
- 'nextcloud_config:/var/www/html/config'
- 'nextcloud_data:/var/www/html/data'
restart: always
networks:
default:
mock_demo:
app:
image: nextcloud:22-apache
links:
- db
- redis
depends_on:
- db
- redis
expose:
- 80
ports:
- "80:80"
deploy:
replicas: 1
update_config:
parallelism: 2
delay: 10s
restart_policy:
condition: on-failure
volumes:
- 'nextcloud:/var/www/html'
- 'nextcloud_apps:/var/www/html/custom_apps'
- 'nextcloud_config:/var/www/html/config'
- 'nextcloud_data:/var/www/html/data'
environment:
- PHP_UPLOAD_LIMIT=1024G
- PHP_MEMORY_LIMIT=12G
- MYSQL_HOST=db
- MYSQL_USER=goo8Noh9iechie6ShaBe
- MYSQL_PASSWORD=rahbiePiz0oobo2Iv9sa
- MYSQL_DATABASE=nextcloud
- NEXTCLOUD_TABLE_PREFIX=nc
- NEXTCLOUD_ADMIN_USER=admin
- NEXTCLOUD_ADMIN_PASSWORD=Wohri6baiZei9mohgaif
- REDIS_HOST=redis
- REDIS_HOST_PASSWORD=aWeNeisaovie9lu4shoh
- OVERWRITEPROTOCOL=http
- APACHE_DISABLE_REWRITE_IP=1
- OBJECTSTORE_S3_HOST=172.19.0.2:4566
- OBJECTSTORE_S3_BUCKET=demo-bucket
- OBJECTSTORE_S3_KEY=ACCESSKEYAWSUSER
- OBJECTSTORE_S3_SECRET=sEcreTKey
- OBJECTSTORE_S3_SSL=false
- OBJECTSTORE_S3_PORT=80
- OBJECTSTORE_S3_REGION=us-west-2
- OBJECTSTORE_S3_USEPATH_STYLE=False
restart: always
networks:
default:
mock_demo:
networks:
default:
mock_demo:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment