WIP
This commit is contained in:
@@ -9,12 +9,11 @@ networks:
|
||||
gitea-backend:
|
||||
|
||||
volumes:
|
||||
nextcloud-db:
|
||||
db:
|
||||
nextcloud:
|
||||
openproject-db:
|
||||
openproject:
|
||||
gitea-db:
|
||||
gitea:
|
||||
openproject:
|
||||
openproject-db:
|
||||
|
||||
x-op-restart-policy: &restart_policy
|
||||
restart: unless-stopped
|
||||
@@ -56,13 +55,24 @@ services:
|
||||
- openproject
|
||||
- gitea
|
||||
|
||||
# NextCloud
|
||||
db:
|
||||
build:
|
||||
context: ./services/mariadb
|
||||
environment:
|
||||
- MARIADB_ROOT_PASSWORD=password
|
||||
networks:
|
||||
- nextcloud-backend
|
||||
- gitea-backend
|
||||
volumes:
|
||||
- db:/var/lib/mysql
|
||||
|
||||
nextcloud:
|
||||
image: nextcloud:31-fpm
|
||||
build:
|
||||
context: ./services/nextcloud
|
||||
environment:
|
||||
- MYSQL_HOST=nextcloud-db
|
||||
- MYSQL_PASSWORD=pswd
|
||||
- MYSQL_HOST=db
|
||||
- MYSQL_PASSWORD=password
|
||||
- MYSQL_DATABASE=nextcloud
|
||||
- MYSQL_USER=nextcloud
|
||||
networks:
|
||||
@@ -71,32 +81,18 @@ services:
|
||||
volumes:
|
||||
- nextcloud:/var/www/html
|
||||
depends_on:
|
||||
- nextcloud-db
|
||||
|
||||
nextcloud-db:
|
||||
image: mariadb:11-ubi
|
||||
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
|
||||
environment:
|
||||
- MARIADB_ROOT_PASSWORD=pswd
|
||||
- MARIADB_AUTO_UPGRADE=1
|
||||
- MARIADB_DISABLE_UPGRADE_BACKUP=1
|
||||
networks:
|
||||
- nextcloud-backend
|
||||
volumes:
|
||||
- nextcloud-db:/var/lib/mysql
|
||||
|
||||
# Gitea
|
||||
- db
|
||||
|
||||
gitea:
|
||||
image: docker.gitea.com/gitea:1.25.2
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
- GITEA__database__DB_TYPE=postgres
|
||||
- GITEA__database__HOST=gitea-db:5432
|
||||
- GITEA__database__DB_TYPE=mysql
|
||||
- GITEA__database__HOST=db:3306
|
||||
- GITEA__database__NAME=gitea
|
||||
- GITEA__database__USER=gitea
|
||||
- GITEA__database__PASSWD=gitea
|
||||
- GITEA__database__PASSWD=password
|
||||
restart: always
|
||||
networks:
|
||||
- gitea-frontend
|
||||
@@ -108,19 +104,7 @@ services:
|
||||
ports:
|
||||
- "222:22"
|
||||
depends_on:
|
||||
- gitea-db
|
||||
|
||||
gitea-db:
|
||||
image: docker.io/library/postgres:14
|
||||
restart: always
|
||||
environment:
|
||||
- POSTGRES_USER=gitea
|
||||
- POSTGRES_PASSWORD=gitea
|
||||
- POSTGRES_DB=gitea
|
||||
networks:
|
||||
- gitea-backend
|
||||
volumes:
|
||||
- gitea-db:/var/lib/postgresql/data
|
||||
- db
|
||||
|
||||
# OpenProject
|
||||
|
||||
|
||||
4
services/mariadb/Dockerfile
Normal file
4
services/mariadb/Dockerfile
Normal file
@@ -0,0 +1,4 @@
|
||||
FROM mariadb:11.4
|
||||
|
||||
COPY ./init.sql /docker-entrypoint-initdb.d/init.sql
|
||||
COPY ./my.cnf /etc/mysql/conf.d/my.cnf
|
||||
7
services/mariadb/init.sql
Normal file
7
services/mariadb/init.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'password';
|
||||
CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
||||
GRANT ALL PRIVILEGES on nextcloud.* to 'nextcloud'@'localhost';
|
||||
|
||||
CREATE USER 'gitea'@'localhost' IDENTIFIED BY 'password';
|
||||
CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
|
||||
GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'localhost';
|
||||
40
services/mariadb/my.cnf
Normal file
40
services/mariadb/my.cnf
Normal file
@@ -0,0 +1,40 @@
|
||||
[mariadb]
|
||||
host-cache-size = 128
|
||||
skip-name-resolve = true
|
||||
|
||||
[mysqld]
|
||||
transaction_isolation = READ-COMMITTED
|
||||
binlog_format = ROW
|
||||
|
||||
[server]
|
||||
skip_name_resolve = 1
|
||||
innodb_buffer_pool_size = 128M
|
||||
innodb_buffer_pool_instances = 1
|
||||
innodb_flush_log_at_trx_commit = 2
|
||||
innodb_log_buffer_size = 32M
|
||||
innodb_max_dirty_pages_pct = 90
|
||||
query_cache_type = 1
|
||||
query_cache_limit = 2M
|
||||
query_cache_min_res_unit = 2k
|
||||
query_cache_size = 64M
|
||||
tmp_table_size= 64M
|
||||
max_heap_table_size= 64M
|
||||
slow_query_log = 1
|
||||
slow_query_log_file = /var/log/mysql/slow.log
|
||||
long_query_time = 1
|
||||
|
||||
[client-server]
|
||||
!includedir /etc/mysql/conf.d/
|
||||
!includedir /etc/mysql/mariadb.conf.d/
|
||||
|
||||
[client]
|
||||
default-character-set = utf8mb4
|
||||
|
||||
[mysqld]
|
||||
character_set_server = utf8mb4
|
||||
collation_server = utf8mb4_general_ci
|
||||
transaction_isolation = READ-COMMITTED
|
||||
binlog_format = ROW
|
||||
innodb_large_prefix=on
|
||||
innodb_file_format=barracuda
|
||||
innodb_file_per_table=1
|
||||
3
services/nextcloud/Dockerfile
Normal file
3
services/nextcloud/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
||||
FROM nextcloud:31-fpm
|
||||
|
||||
COPY ./mysql.ini /usr/local/etc/php/conf.d/mysql.ini
|
||||
16
services/nextcloud/mysql.ini
Normal file
16
services/nextcloud/mysql.ini
Normal file
@@ -0,0 +1,16 @@
|
||||
# configuration for PHP MySQL module
|
||||
extension=pdo_mysql.so
|
||||
|
||||
[mysql]
|
||||
mysql.allow_local_infile=On
|
||||
mysql.allow_persistent=On
|
||||
mysql.cache_size=2000
|
||||
mysql.max_persistent=-1
|
||||
mysql.max_links=-1
|
||||
mysql.default_port=
|
||||
mysql.default_socket=/var/lib/mysql/mysql.sock # Debian squeeze: /var/run/mysqld/mysqld.sock
|
||||
mysql.default_host=
|
||||
mysql.default_user=
|
||||
mysql.default_password=
|
||||
mysql.connect_timeout=60
|
||||
mysql.trace_mode=Off
|
||||
@@ -20,7 +20,7 @@ server {
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name openproject.yourdomain.com;
|
||||
server_name openproject.localhost;
|
||||
|
||||
ssl_certificate /etc/ssl/crt/server.crt;
|
||||
ssl_certificate_key /etc/ssl/crt/server.key;
|
||||
@@ -40,7 +40,7 @@ server {
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name gitea.yourdomain.com;
|
||||
server_name gitea.localhost;
|
||||
|
||||
ssl_certificate /etc/ssl/crt/server.crt;
|
||||
ssl_certificate_key /etc/ssl/crt/server.key;
|
||||
@@ -61,7 +61,7 @@ server {
|
||||
# https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/web/nginx.conf
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name nextcloud.yourdomain.com;
|
||||
server_name nextcloud.localhost;
|
||||
|
||||
ssl_certificate /etc/ssl/crt/server.crt;
|
||||
ssl_certificate_key /etc/ssl/crt/server.key;
|
||||
|
||||
Reference in New Issue
Block a user