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=