From e05e2f1dd709d5cdfedbd3d81d7f9853b863f5a8 Mon Sep 17 00:00:00 2001 From: Tilo Spannagel Date: Wed, 1 Aug 2018 21:59:11 +0200 Subject: [PATCH 1/2] Use custom Dockerfiles instead of mounts --- .../mariadb/fpm/docker-compose.yml | 22 +++++++++---------- .../mariadb/fpm/proxy/Dockerfile | 3 +++ .../mariadb/fpm/proxy/uploadsize.conf | 1 + .../mariadb/fpm/web/Dockerfile | 3 +++ .../mariadb/fpm/{ => web}/nginx.conf | 0 5 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 .examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/proxy/Dockerfile create mode 100644 .examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/proxy/uploadsize.conf create mode 100644 .examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/web/Dockerfile rename .examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/{ => web}/nginx.conf (100%) diff --git a/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/docker-compose.yml b/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/docker-compose.yml index 92a4967b..2b05bd56 100644 --- a/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/docker-compose.yml +++ b/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/docker-compose.yml @@ -3,15 +3,17 @@ version: '3' services: db: image: mariadb - restart: unless-stopped + restart: always volumes: - db:/var/lib/mysql + environment: + - MYSQL_ROOT_PASSWORD= env_file: - db.env - app: + app: image: nextcloud:fpm - restart: unless-stopped + restart: always volumes: - nextcloud:/var/www/html environment: @@ -22,28 +24,24 @@ services: - db web: - image: nginx - restart: unless-stopped + build: ./web + restart: always volumes: - nextcloud:/var/www/html:ro - - ./nginx.conf:/etc/nginx/nginx.conf:ro environment: - - VIRTUAL_HOST=servhostname.local + - VIRTUAL_HOST= depends_on: - app - - proxy networks: - proxy-tier - default proxy: - image: jwilder/nginx-proxy:alpine - restart: unless-stopped + build: ./proxy + restart: always ports: - 80:80 - 443:443 - environment: - - MAX_UPLOAD_SIZE=10GB volumes: - certs:/etc/nginx/certs:ro - vhost.d:/etc/nginx/vhost.d diff --git a/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/proxy/Dockerfile b/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/proxy/Dockerfile new file mode 100644 index 00000000..242c84e1 --- /dev/null +++ b/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/proxy/Dockerfile @@ -0,0 +1,3 @@ +FROM jwilder/nginx-proxy:alpine + +COPY uploadsize.conf /etc/nginx/conf.d/uploadsize.conf diff --git a/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/proxy/uploadsize.conf b/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/proxy/uploadsize.conf new file mode 100644 index 00000000..c636de7d --- /dev/null +++ b/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/proxy/uploadsize.conf @@ -0,0 +1 @@ +client_max_body_size 10G; diff --git a/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/web/Dockerfile b/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/web/Dockerfile new file mode 100644 index 00000000..d6eac3e8 --- /dev/null +++ b/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/web/Dockerfile @@ -0,0 +1,3 @@ +FROM nginx + +COPY nginx.conf /etc/nginx/nginx.conf diff --git a/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/nginx.conf b/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/web/nginx.conf similarity index 100% rename from .examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/nginx.conf rename to .examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/web/nginx.conf From 95863560089b504f5371a115fc2fbb40df518a00 Mon Sep 17 00:00:00 2001 From: Tilo Spannagel Date: Wed, 1 Aug 2018 22:02:44 +0200 Subject: [PATCH 2/2] Add mariadb command line arguments --- .../mariadb/fpm/docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/docker-compose.yml b/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/docker-compose.yml index 2b05bd56..55b2ef28 100644 --- a/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/docker-compose.yml +++ b/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm/docker-compose.yml @@ -3,6 +3,7 @@ version: '3' services: db: image: mariadb + command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW restart: always volumes: - db:/var/lib/mysql