├── README.md ├── docker-compose.yml └── nextcloud-minio-compose.yml /README.md: -------------------------------------------------------------------------------- 1 | # nextcloud-docker 2 | next could with docker-compose 3 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | volumes: 2 | db: 3 | nextcloud: 4 | 5 | services: 6 | db: 7 | image: mariadb:10.5 8 | restart: always 9 | command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW 10 | volumes: 11 | - db:/var/lib/mysql 12 | environment: 13 | - MYSQL_ROOT_PASSWORD=Packops-DB_Password 14 | - MYSQL_PASSWORD=Packops_PASS 15 | - MYSQL_DATABASE=nextcloud 16 | - MYSQL_USER=nextcloud 17 | 18 | app: 19 | image: nextcloud 20 | restart: always 21 | ports: 22 | - 80:80 23 | links: 24 | - db 25 | volumes: 26 | - nextcloud:/var/www/html 27 | environment: 28 | - MYSQL_PASSWORD=Packops_PASS 29 | - MYSQL_DATABASE=nextcloud 30 | - MYSQL_USER=nextcloud 31 | - MYSQL_HOST=db 32 | 33 | -------------------------------------------------------------------------------- /nextcloud-minio-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.2' 2 | 3 | services: 4 | db: 5 | image: postgres 6 | restart: always 7 | volumes: 8 | - db:/var/lib/postgresql/data 9 | environment: 10 | - POSTGRES_DB_FILE=/run/secrets/postgres_db 11 | - POSTGRES_USER_FILE=/run/secrets/postgres_user 12 | - POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password 13 | secrets: 14 | - postgres_db 15 | - postgres_password 16 | - postgres_user 17 | 18 | app: 19 | image: nextcloud 20 | restart: always 21 | ports: 22 | - 8080:80 23 | volumes: 24 | - nextcloud:/var/www/html 25 | environment: 26 | - POSTGRES_HOST=db 27 | - POSTGRES_DB_FILE=/run/secrets/postgres_db 28 | - POSTGRES_USER_FILE=/run/secrets/postgres_user 29 | - POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password 30 | - NEXTCLOUD_ADMIN_PASSWORD_FILE=/run/secrets/nextcloud_admin_password 31 | - NEXTCLOUD_ADMIN_USER_FILE=/run/secrets/nextcloud_admin_user 32 | - NEXTCLOUD_TRUSTED_DOMAINS=172.22.99.125 33 | - OBJECTSTORE_S3_HOST=objstor 34 | - OBJECTSTORE_S3_BUCKET=nextcloud 35 | - OBJECTSTORE_S3_KEY=/run/secrets/minio_user 36 | - OBJECTSTORE_S3_SECRET=/run/secrets/minio_password 37 | - OBJECTSTORE_S3_PORT=9000 38 | - OBJECTSTORE_S3_SSL=false 39 | - OBJECTSTORE_S3_REGION=optional 40 | - OBJECTSTORE_S3_USEPATH_STYLE=true 41 | depends_on: 42 | - db 43 | secrets: 44 | - nextcloud_admin_password 45 | - nextcloud_admin_user 46 | - postgres_db 47 | - postgres_password 48 | - postgres_user 49 | - minio_user 50 | - minio_password 51 | 52 | objstor: 53 | image: minio/minio 54 | restart: always 55 | ports: 56 | - 9000:9000 57 | volumes: 58 | - ./data1:/data1 59 | - ./data2:/data2 60 | - ./data3:/data3 61 | - ./data4:/data4 62 | environment: 63 | MINIO_ACCESS_KEY: /run/secrets/minio_user 64 | MINIO_SECRET_KEY: /run/secrets/minio_password 65 | command: server /data{1...4} 66 | healthcheck: 67 | test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] 68 | interval: 30s 69 | timeout: 20s 70 | retries: 3 71 | secrets: 72 | - minio_user 73 | - minio_password 74 | 75 | 76 | 77 | volumes: 78 | db: 79 | nextcloud: 80 | portainer_data: 81 | 82 | secrets: 83 | nextcloud_admin_password: 84 | file: ./nextcloud_admin_password.txt # put admin password to this file 85 | nextcloud_admin_user: 86 | file: ./nextcloud_admin_user.txt # put admin username to this file 87 | postgres_db: 88 | file: ./postgres_db.txt # put postgresql db name to this file 89 | postgres_password: 90 | file: ./postgres_password.txt # put postgresql password to this file 91 | postgres_user: 92 | file: ./postgres_user.txt # put postgresql username to this file 93 | minio_user: 94 | file: ./minio_user.txt 95 | minio_password: 96 | file: ./minio_password.txt 97 | --------------------------------------------------------------------------------