Loading .env.example +11 −2 Original line number Diff line number Diff line # docker compose COMPOSE_BAKE=true COMPOSE_FILE=docker-compose.yml:docker-compose.local.yml # Server DOMAIN=localhost # mail SMTP_SECURE=tls SMTP_PORT=587 SMTP_NAME=username SMTP_PASSWORD=123456 SMTP_HOST=smtp.domain.com Loading @@ -22,10 +25,16 @@ REDIS_HOST=redis REDIS_HOST_PASSWORD=12456 # nextcloud NEXTCLOUD_DOCKERFILE=slim.Dockerfile NEXTCLOUD_DOCKER_IMG=registry.gitlab.e.foundation/e/infra/ecloud/nextcloud/slim NEXTCLOUD_DOCKER_IMG=registry.gitlab.e.foundation/e/infra/ecloud/nextcloud/slim:latest NEXTCLOUD_ADMIN_USER=admin NEXTCLOUD_ADMIN_PASSWORD=@dm1n NEXTCLOUD_TRUSTED_DOMAINS=nginx SENTRY_DSN= SENTRY_PUBLIC_DSN= # nginx NGINX_DOCKER_IMG=registry.gitlab.e.foundation/e/infra/ecloud/nextcloud/nginx:latest # syslog SYSLOG_HOST=syslog .gitlab-ci.yml +24 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,12 @@ build-slim-workspace: DOCKER_BUILD_ARGS: "-f slim.Dockerfile" REGISTRY_SUBPATH: "/slim" build-nginx-workspace: extends: .build variables: DOCKER_BUILD_ARGS: "-f nginx.Dockerfile" REGISTRY_SUBPATH: "/nginx" publish-slim-latest: extends: .deploy variables: Loading @@ -43,6 +49,15 @@ publish-slim-latest: rules: - if: '$CI_COMMIT_REF_NAME == "slim"' publish-nginx-latest: extends: .deploy variables: DOCKER_BUILD_ARGS: "-f nginx.Dockerfile" REGISTRY_SUBPATH: "/nginx" MW_DOCKER_VERSION: "latest" rules: - if: '$CI_COMMIT_REF_NAME == "slim"' publish-slim-tag: extends: .deploy variables: Loading @@ -51,3 +66,12 @@ publish-slim-tag: MW_DOCKER_VERSION: "${CI_COMMIT_TAG/v/}" rules: - if: '$CI_COMMIT_TAG' publish-nginx-tag: extends: .deploy variables: DOCKER_BUILD_ARGS: "-f nginx.Dockerfile" REGISTRY_SUBPATH: "/nginx" MW_DOCKER_VERSION: "${CI_COMMIT_TAG/v/}" rules: - if: '$CI_COMMIT_TAG' README.md +19 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,8 @@ This project builds a custom docker image from the official [Nextcloud](https:// ## Getting started ### Local environment You can configure default values from the `.env` file. See [.env.example](./.env.example). By default, the `slim` Murena Workspace is configured. Loading @@ -16,3 +18,20 @@ docker compose up --build -d ``` Go to http://localhost:8000 then use admin credentials provided into `.env` file. ### Swarm environment with managed storage and services First create the context: ``` docker context create dev --description "Development environment" --docker "host=ssh://root@dev.domain.app" docker --context dev service ls ``` Secondly, once the .env configuration file initiated create the deployments stack: ``` set -a && source .env && set +a docker --context dev stack deploy -c docker-compose.yml instance1 ``` config/nginx/templates/default.conf.template +1 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ map $arg_v $asset_immutable { } upstream php-handler { server nextcloud:9000; server ${NEXTCLOUD_ADDR}; } server { Loading docker-compose.local.yml 0 → 100644 +55 −0 Original line number Diff line number Diff line services: db: image: postgres:17.4-alpine restart: unless-stopped environment: - POSTGRES_DB=${DB_NAME} - POSTGRES_USER=${DB_USER} - POSTGRES_PASSWORD=${DB_PASSWORD} volumes: - db:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"] interval: 10s timeout: 5s retries: 5 redis: image: redis:7.4-alpine restart: unless-stopped healthcheck: test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] interval: 10s timeout: 5s retries: 5 syslog: image: jumanjiman/rsyslog restart: unless-stopped nextcloud: build: context: . dockerfile: slim.Dockerfile depends_on: syslog: condition: service_started required: false db: condition: service_healthy required: false redis: condition: service_healthy required: false nginx: build: context: . dockerfile: nginx.Dockerfile ports: - "8000:80" depends_on: - nextcloud volumes: db: Loading
.env.example +11 −2 Original line number Diff line number Diff line # docker compose COMPOSE_BAKE=true COMPOSE_FILE=docker-compose.yml:docker-compose.local.yml # Server DOMAIN=localhost # mail SMTP_SECURE=tls SMTP_PORT=587 SMTP_NAME=username SMTP_PASSWORD=123456 SMTP_HOST=smtp.domain.com Loading @@ -22,10 +25,16 @@ REDIS_HOST=redis REDIS_HOST_PASSWORD=12456 # nextcloud NEXTCLOUD_DOCKERFILE=slim.Dockerfile NEXTCLOUD_DOCKER_IMG=registry.gitlab.e.foundation/e/infra/ecloud/nextcloud/slim NEXTCLOUD_DOCKER_IMG=registry.gitlab.e.foundation/e/infra/ecloud/nextcloud/slim:latest NEXTCLOUD_ADMIN_USER=admin NEXTCLOUD_ADMIN_PASSWORD=@dm1n NEXTCLOUD_TRUSTED_DOMAINS=nginx SENTRY_DSN= SENTRY_PUBLIC_DSN= # nginx NGINX_DOCKER_IMG=registry.gitlab.e.foundation/e/infra/ecloud/nextcloud/nginx:latest # syslog SYSLOG_HOST=syslog
.gitlab-ci.yml +24 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,12 @@ build-slim-workspace: DOCKER_BUILD_ARGS: "-f slim.Dockerfile" REGISTRY_SUBPATH: "/slim" build-nginx-workspace: extends: .build variables: DOCKER_BUILD_ARGS: "-f nginx.Dockerfile" REGISTRY_SUBPATH: "/nginx" publish-slim-latest: extends: .deploy variables: Loading @@ -43,6 +49,15 @@ publish-slim-latest: rules: - if: '$CI_COMMIT_REF_NAME == "slim"' publish-nginx-latest: extends: .deploy variables: DOCKER_BUILD_ARGS: "-f nginx.Dockerfile" REGISTRY_SUBPATH: "/nginx" MW_DOCKER_VERSION: "latest" rules: - if: '$CI_COMMIT_REF_NAME == "slim"' publish-slim-tag: extends: .deploy variables: Loading @@ -51,3 +66,12 @@ publish-slim-tag: MW_DOCKER_VERSION: "${CI_COMMIT_TAG/v/}" rules: - if: '$CI_COMMIT_TAG' publish-nginx-tag: extends: .deploy variables: DOCKER_BUILD_ARGS: "-f nginx.Dockerfile" REGISTRY_SUBPATH: "/nginx" MW_DOCKER_VERSION: "${CI_COMMIT_TAG/v/}" rules: - if: '$CI_COMMIT_TAG'
README.md +19 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,8 @@ This project builds a custom docker image from the official [Nextcloud](https:// ## Getting started ### Local environment You can configure default values from the `.env` file. See [.env.example](./.env.example). By default, the `slim` Murena Workspace is configured. Loading @@ -16,3 +18,20 @@ docker compose up --build -d ``` Go to http://localhost:8000 then use admin credentials provided into `.env` file. ### Swarm environment with managed storage and services First create the context: ``` docker context create dev --description "Development environment" --docker "host=ssh://root@dev.domain.app" docker --context dev service ls ``` Secondly, once the .env configuration file initiated create the deployments stack: ``` set -a && source .env && set +a docker --context dev stack deploy -c docker-compose.yml instance1 ```
config/nginx/templates/default.conf.template +1 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ map $arg_v $asset_immutable { } upstream php-handler { server nextcloud:9000; server ${NEXTCLOUD_ADDR}; } server { Loading
docker-compose.local.yml 0 → 100644 +55 −0 Original line number Diff line number Diff line services: db: image: postgres:17.4-alpine restart: unless-stopped environment: - POSTGRES_DB=${DB_NAME} - POSTGRES_USER=${DB_USER} - POSTGRES_PASSWORD=${DB_PASSWORD} volumes: - db:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"] interval: 10s timeout: 5s retries: 5 redis: image: redis:7.4-alpine restart: unless-stopped healthcheck: test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] interval: 10s timeout: 5s retries: 5 syslog: image: jumanjiman/rsyslog restart: unless-stopped nextcloud: build: context: . dockerfile: slim.Dockerfile depends_on: syslog: condition: service_started required: false db: condition: service_healthy required: false redis: condition: service_healthy required: false nginx: build: context: . dockerfile: nginx.Dockerfile ports: - "8000:80" depends_on: - nextcloud volumes: db: