diff --git a/.env b/.env new file mode 120000 index 0000000..7b4cabe --- /dev/null +++ b/.env @@ -0,0 +1 @@ +nextcloud.conf \ No newline at end of file diff --git a/data/conf/mysql/docker.cnf b/data/conf/mysql/docker.cnf new file mode 100644 index 0000000..4f1829d --- /dev/null +++ b/data/conf/mysql/docker.cnf @@ -0,0 +1,3 @@ +[mysqld] +skip-host-cache +skip-name-resolve diff --git a/data/conf/mysql/mysql.cnf b/data/conf/mysql/mysql.cnf new file mode 100644 index 0000000..56a15ee --- /dev/null +++ b/data/conf/mysql/mysql.cnf @@ -0,0 +1,13 @@ +[mysqld] +character-set-client-handshake = FALSE +character-set-server = utf8mb4 +collation-server = utf8mb4_unicode_ci +innodb_file_per_table = TRUE +innodb_file_format = barracuda +innodb_large_prefix = TRUE + +[client] +default-character-set = utf8mb4 + +[mysql] +default-character-set = utf8mb4 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..4875583 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,55 @@ +version: '2.1' + +services: + nextcloud-main: + image: nextcloud: + restart: always + mem_limit: 1g + depends_on: + - nextcloud-database + environment: + - NEXTCLOUD_DATABASE_HOST=cloud + - NEXTCLOUD_DATABASE_NAME=${NEXTCLOUD_DATABASE_NAME} + - NEXTCLOUD_DATABASE_USER=${NEXTCLOUD_DATABASE_USER} + - NEXTCLOUD_DATABASE_PASSWORD=${NEXTCLOUD_DATABASE_PASSWORD} + - TZ=${TZ} + tmpfs: + - /tmp + networks: + nextcloud-network: + ipv4_address: 172.22.5.100 + aliases: + - cloud + + nextcloud-database: + image: mariadb:10.2 + restart: always + mem_limit: 2g + command: mysqld --skip-name-resolve --skip-host-cache --log-warnings=0 + environment: + - MYSQL_ROOT_PASSWORD=${NEXTCLOUD_DATABASE_ROOT} + - MYSQL_DATABASE=${NEXTCLOUD_DATABASE_NAME} + - MYSQL_USER=${NEXTCLOUD_DATABASE_USER} + - MYSQL_PASSWORD=${NEXTCLOUD_DATABASE_PASSWORD} + volumes: + - nextcloud-db-vol-1:/var/lib/mysql/ + - ./data/conf/mysql:/etc/mysql/conf.d/:ro + tmpfs: + - /tmp + networks: + nextcloud-network: + ipv4_address: 172.22.5.101 + aliases: + - mysql + +networks: + nextcloud-network: + driver: bridge + enable_ipv6: false + ipam: + driver: default + config: + - subnet: 172.22.5.0/24 + +volumes: + nextcloud-db-vol-1: