From 0aea49e71a42a23b7239c4607221c6e5acc0b4f8 Mon Sep 17 00:00:00 2001 From: thopic Date: Tue, 20 Jul 2021 18:03:45 +0200 Subject: [PATCH] [NC] Add testing --- nextcloud/testing/.env.example | 1 + nextcloud/testing/.gitignore | 1 + nextcloud/testing/docker-compose.yml | 43 ++++++++++++++++++++ nextcloud/testing/secrets/db.secrets.example | 4 ++ 4 files changed, 49 insertions(+) create mode 100644 nextcloud/testing/.env.example create mode 100644 nextcloud/testing/.gitignore create mode 100644 nextcloud/testing/docker-compose.yml create mode 100644 nextcloud/testing/secrets/db.secrets.example diff --git a/nextcloud/testing/.env.example b/nextcloud/testing/.env.example new file mode 100644 index 0000000..a756e28 --- /dev/null +++ b/nextcloud/testing/.env.example @@ -0,0 +1 @@ +CN= diff --git a/nextcloud/testing/.gitignore b/nextcloud/testing/.gitignore new file mode 100644 index 0000000..8fce603 --- /dev/null +++ b/nextcloud/testing/.gitignore @@ -0,0 +1 @@ +data/ diff --git a/nextcloud/testing/docker-compose.yml b/nextcloud/testing/docker-compose.yml new file mode 100644 index 0000000..844f0a4 --- /dev/null +++ b/nextcloud/testing/docker-compose.yml @@ -0,0 +1,43 @@ +version: "3.8" + +services: + nextcloud_db: + image: mariadb:10.5.4 + container_name: nextcloud_db2 + env_file: + - ./secrets/db.secrets + volumes: + - ./data/db:/var/lib/mysql + restart: unless-stopped + + nextcloud_app: + image: nextcloud:19.0.10 + depends_on: + - nextcloud_db + container_name : nextcloud_app2 + networks: + - proxy + - default + expose: + - "80" + links: + - nextcloud_db + volumes: + - ./data/app/config.php:/var/www/html/config/config.php + hostname: ${CN} + restart: unless-stopped + labels: + - "traefik.enable=true" + - "traefik.docker.network=proxy" + - "traefik.http.middlewares.nc2-redirect-websecure.redirectscheme.scheme=https" + - "traefik.http.routers.nc2-http.middlewares=nc2-redirect-websecure" + - "traefik.http.routers.nc2-http.rule=Host(`${CN}`)" + - "traefik.http.routers.nc2-http.entrypoints=web" + - "traefik.http.routers.nc2-https.rule=Host(`${CN}`)" + - "traefik.http.routers.nc2-https.entrypoints=websecure" + - "traefik.http.routers.nc2-https.tls=true" + - "traefik.http.routers.nc2-https.tls.certresolver=myhttpchallenge" + +networks: + proxy: + external: true diff --git a/nextcloud/testing/secrets/db.secrets.example b/nextcloud/testing/secrets/db.secrets.example new file mode 100644 index 0000000..d6ccc08 --- /dev/null +++ b/nextcloud/testing/secrets/db.secrets.example @@ -0,0 +1,4 @@ +MYSQL_ROOT_PASSWORD= +MYSQL_DATABASE= +MYSQL_PASSWORD= +MYSQL_USER=