Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e790a65 authored by Arnau Vàzquez's avatar Arnau Vàzquez
Browse files

Merge branch 'docker-build' into 'master'

Docker build

See merge request !1
parents 1198b557 1c31aa7d
Loading
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+2 −0
Original line number Diff line number Diff line
.idea
files

.gitlab-ci.yml

0 → 100644
+18 −0
Original line number Diff line number Diff line
docker-build:
  image: docker:stable

  # When using dind, it's wise to use the overlayfs driver for
  # improved performance.
  variables:
    DOCKER_DRIVER: overlay2

  services:
    - docker:dind
  before_script:
    - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
  stage: build
  tags:
    - generic_privileged 
  script:
    - docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
    - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
 No newline at end of file

Dockerfile

0 → 100644
+5 −0
Original line number Diff line number Diff line
FROM nextcloud:18-fpm
RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images
COPY patches/ /tmp/build_patches/
RUN patch -u /usr/src/nextcloud/version.php -i /tmp/build_patches/001-version-bump.patch && \
	patch -u /usr/src/nextcloud/core/Controller/LoginController.php -i /tmp/build_patches/002-login-without-domain.patch
+9 −0
Original line number Diff line number Diff line
--- version.original.php	2020-12-04 10:55:45.000000000 +0100
+++ version.php	2020-12-04 10:56:09.000000000 +0100
@@ -1,5 +1,5 @@
 <?php 
-$OC_Version = array(18,0,11,2);
+$OC_Version = array(18,0,11,3);
 $OC_VersionString = '18.0.11';
 $OC_Edition = '';
 $OC_Channel = 'stable';
+17 −0
Original line number Diff line number Diff line
--- LoginController.original.php	2020-10-21 17:32:18.000000000 +0200
+++ LoginController.php	2020-10-21 18:03:51.000000000 +0200
@@ -289,6 +289,14 @@
 			return $this->generateRedirect($redirect_url);
 		}
 
+		$user = trim($user);
+		$domain = $this->config->getSystemValue("mail_domain");
+		$domain_suffix = "@$domain";
+		$admin_username = $_ENV["NEXTCLOUD_ADMIN_USER"];
+		if (stristr($user, $domain_suffix) === FALSE && strcmp($user, $admin_username) != 0) {
+			$user = $user . $domain_suffix;
+		}
+
 		$data = new LoginData(
 			$this->request,
 			trim($user),