Loading .gitlab-ci.yml +2 −2 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ extends: .docker stage: build script: - docker build --pull -t $CI_REGISTRY_IMAGE$REGISTRY_SUBPATH:$CI_COMMIT_REF_SLUG $DOCKER_BUILD_ARGS . - docker build -t $CI_REGISTRY_IMAGE$REGISTRY_SUBPATH:$CI_COMMIT_REF_SLUG $DOCKER_BUILD_ARGS . rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' Loading @@ -19,7 +19,7 @@ extends: .docker stage: deploy script: - docker build --pull -t $CI_REGISTRY_IMAGE$REGISTRY_SUBPATH:${CI_COMMIT_TAG/v/} $DOCKER_BUILD_ARGS . - docker build -t $CI_REGISTRY_IMAGE$REGISTRY_SUBPATH:${CI_COMMIT_TAG/v/} $DOCKER_BUILD_ARGS . - docker push $CI_REGISTRY_IMAGE$REGISTRY_SUBPATH:${CI_COMMIT_TAG/v/} rules: - if: '$CI_COMMIT_TAG' Loading README.md +6 −8 Original line number Diff line number Diff line # Murena workspace # Murena Workspace This project builds a custom docker image from the official Nextcloud one, applying patches to make Murena Workspace. This project builds a custom docker image from the official [Nextcloud](https://nextcloud.com), applying patches to make Murena Workspace. 2 images are available the default one and the `slim` one which only you to setup it with your needs. Murena workspace use php `fpm` as base version by default while the slim version relies on the `apache` one. 2 images are available the `default` and the `slim` ones. ## Getting started You can configure default values from the `.env` file. see [.env.example](./.env.example). By default, the slim Murena Workspace is configured. You can configure default values from the `.env` file. See [.env.example](./.env.example). By default, the `slim` Murena Workspace is configured. slim Murena Workspace `slim` Murena Workspace ``` cp .env.example .env docker compose up --build -d Loading config/syslog-ng/syslog-ng.conf 0 → 100644 +15 −0 Original line number Diff line number Diff line @version: 3.35 source s_local { system(expect-hostname(yes)); internal(); }; destination d_remote { network("${SYSLOG_HOST}" port(514) transport(tcp)); }; log { source(s_local); destination(d_remote); }; custom_entrypoint.sh +6 −29 Original line number Diff line number Diff line #!/bin/sh version_greater() { [ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ] } echo "Murena entrypoint" echo "Custom eCloud entrypoint" rsync_options="-rlDog --chown www-data:www-data --delete" SRC_DIR="/usr/src/nextcloud" DST_DIR="/var/www/html" installed_version="0.0.0.0" if [ -f /var/www/html/version.php ]; then installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" fi image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')" if version_greater "$image_version" "$installed_version"; then rsync $rsync_options --include "/notes/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/calendar/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/contacts/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/ecloud-theme-helper/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/murena_launcher/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/murena-dashboard/" --exclude '/*' $SRC_DIR/custom_apps/ /$DST_DIR/custom_apps/ rsync $rsync_options --include "/snappymail/" --exclude '/*' $SRC_DIR/custom_apps/ /$DST_DIR/custom_apps/ rsync $rsync_options --include "/eCloud/" --exclude '/*' $SRC_DIR/themes/ $DST_DIR/themes/ rsync $rsync_options --include "/Murena/" --exclude '/*' $SRC_DIR/themes/ $DST_DIR/themes/ rsync $rsync_options --include "/memories/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ else echo "Skipping rsync step as version not updated!" # syslog-ng if [ -n ${SYSLOG_HOST} ]; then sed -i "s|\${SYSLOG_HOST}|${SYSLOG_HOST:-127.0.0.1}|g" /etc/syslog-ng/syslog-ng.conf syslog-ng --no-caps echo "syslog-ng started." fi /entrypoint.sh "$@" docker-compose.yml +13 −6 Original line number Diff line number Diff line Loading @@ -17,7 +17,11 @@ services: redis: image: redis:7.4-alpine restart: unless-stopped command: redis-server --requirepass ${REDIS_HOST_PASSWORD} healthcheck: test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] interval: 10s timeout: 5s retries: 5 nextcloud: image: ${NEXTCLOUD_DOCKER_IMG} Loading @@ -31,7 +35,6 @@ services: - POSTGRES_PASSWORD=${DB_PASSWORD} - POSTGRES_DB=${DB_NAME} - REDIS_HOST=${REDIS_HOST} - REDIS_HOST_PASSWORD=${REDIS_HOST_PASSWORD} - NEXTCLOUD_ADMIN_USER=${NEXTCLOUD_ADMIN_USER} - NEXTCLOUD_ADMIN_PASSWORD=${NEXTCLOUD_ADMIN_PASSWORD} - NEXTCLOUD_TRUSTED_DOMAINS=${DOMAIN} Loading @@ -42,15 +45,19 @@ services: - SMTP_HOST=${SMTP_HOST} - MAIL_FROM_ADDRESS=${MAIL_FROM_ADDRESS} - MAIL_DOMAIN=${MAIL_DOMAIN} ports: - "8000:80" - SYSLOG_HOST=syslog volumes: - nextcloud:/var/www/html depends_on: syslog: condition: service_started db: condition: service_healthy redis: condition: service_started condition: service_healthy syslog: image: jumanjiman/rsyslog nextcloud-cron: image: ${NEXTCLOUD_DOCKER_IMG} Loading @@ -67,7 +74,7 @@ services: environment: DOMAIN: ${DOMAIN} ports: - "8080:80" - "8000:80" volumes: - ${DEPLOYMENT_PATH:-.}/config/nginx/templates:/etc/nginx/templates - nextcloud:/var/www/html Loading Loading
.gitlab-ci.yml +2 −2 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ extends: .docker stage: build script: - docker build --pull -t $CI_REGISTRY_IMAGE$REGISTRY_SUBPATH:$CI_COMMIT_REF_SLUG $DOCKER_BUILD_ARGS . - docker build -t $CI_REGISTRY_IMAGE$REGISTRY_SUBPATH:$CI_COMMIT_REF_SLUG $DOCKER_BUILD_ARGS . rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' Loading @@ -19,7 +19,7 @@ extends: .docker stage: deploy script: - docker build --pull -t $CI_REGISTRY_IMAGE$REGISTRY_SUBPATH:${CI_COMMIT_TAG/v/} $DOCKER_BUILD_ARGS . - docker build -t $CI_REGISTRY_IMAGE$REGISTRY_SUBPATH:${CI_COMMIT_TAG/v/} $DOCKER_BUILD_ARGS . - docker push $CI_REGISTRY_IMAGE$REGISTRY_SUBPATH:${CI_COMMIT_TAG/v/} rules: - if: '$CI_COMMIT_TAG' Loading
README.md +6 −8 Original line number Diff line number Diff line # Murena workspace # Murena Workspace This project builds a custom docker image from the official Nextcloud one, applying patches to make Murena Workspace. This project builds a custom docker image from the official [Nextcloud](https://nextcloud.com), applying patches to make Murena Workspace. 2 images are available the default one and the `slim` one which only you to setup it with your needs. Murena workspace use php `fpm` as base version by default while the slim version relies on the `apache` one. 2 images are available the `default` and the `slim` ones. ## Getting started You can configure default values from the `.env` file. see [.env.example](./.env.example). By default, the slim Murena Workspace is configured. You can configure default values from the `.env` file. See [.env.example](./.env.example). By default, the `slim` Murena Workspace is configured. slim Murena Workspace `slim` Murena Workspace ``` cp .env.example .env docker compose up --build -d Loading
config/syslog-ng/syslog-ng.conf 0 → 100644 +15 −0 Original line number Diff line number Diff line @version: 3.35 source s_local { system(expect-hostname(yes)); internal(); }; destination d_remote { network("${SYSLOG_HOST}" port(514) transport(tcp)); }; log { source(s_local); destination(d_remote); };
custom_entrypoint.sh +6 −29 Original line number Diff line number Diff line #!/bin/sh version_greater() { [ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ] } echo "Murena entrypoint" echo "Custom eCloud entrypoint" rsync_options="-rlDog --chown www-data:www-data --delete" SRC_DIR="/usr/src/nextcloud" DST_DIR="/var/www/html" installed_version="0.0.0.0" if [ -f /var/www/html/version.php ]; then installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')" fi image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')" if version_greater "$image_version" "$installed_version"; then rsync $rsync_options --include "/notes/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/calendar/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/contacts/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/ecloud-theme-helper/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/murena_launcher/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/murena-dashboard/" --exclude '/*' $SRC_DIR/custom_apps/ /$DST_DIR/custom_apps/ rsync $rsync_options --include "/snappymail/" --exclude '/*' $SRC_DIR/custom_apps/ /$DST_DIR/custom_apps/ rsync $rsync_options --include "/eCloud/" --exclude '/*' $SRC_DIR/themes/ $DST_DIR/themes/ rsync $rsync_options --include "/Murena/" --exclude '/*' $SRC_DIR/themes/ $DST_DIR/themes/ rsync $rsync_options --include "/memories/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ else echo "Skipping rsync step as version not updated!" # syslog-ng if [ -n ${SYSLOG_HOST} ]; then sed -i "s|\${SYSLOG_HOST}|${SYSLOG_HOST:-127.0.0.1}|g" /etc/syslog-ng/syslog-ng.conf syslog-ng --no-caps echo "syslog-ng started." fi /entrypoint.sh "$@"
docker-compose.yml +13 −6 Original line number Diff line number Diff line Loading @@ -17,7 +17,11 @@ services: redis: image: redis:7.4-alpine restart: unless-stopped command: redis-server --requirepass ${REDIS_HOST_PASSWORD} healthcheck: test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] interval: 10s timeout: 5s retries: 5 nextcloud: image: ${NEXTCLOUD_DOCKER_IMG} Loading @@ -31,7 +35,6 @@ services: - POSTGRES_PASSWORD=${DB_PASSWORD} - POSTGRES_DB=${DB_NAME} - REDIS_HOST=${REDIS_HOST} - REDIS_HOST_PASSWORD=${REDIS_HOST_PASSWORD} - NEXTCLOUD_ADMIN_USER=${NEXTCLOUD_ADMIN_USER} - NEXTCLOUD_ADMIN_PASSWORD=${NEXTCLOUD_ADMIN_PASSWORD} - NEXTCLOUD_TRUSTED_DOMAINS=${DOMAIN} Loading @@ -42,15 +45,19 @@ services: - SMTP_HOST=${SMTP_HOST} - MAIL_FROM_ADDRESS=${MAIL_FROM_ADDRESS} - MAIL_DOMAIN=${MAIL_DOMAIN} ports: - "8000:80" - SYSLOG_HOST=syslog volumes: - nextcloud:/var/www/html depends_on: syslog: condition: service_started db: condition: service_healthy redis: condition: service_started condition: service_healthy syslog: image: jumanjiman/rsyslog nextcloud-cron: image: ${NEXTCLOUD_DOCKER_IMG} Loading @@ -67,7 +74,7 @@ services: environment: DOMAIN: ${DOMAIN} ports: - "8080:80" - "8000:80" volumes: - ${DEPLOYMENT_PATH:-.}/config/nginx/templates:/etc/nginx/templates - nextcloud:/var/www/html Loading