From b66d02c1e439f6e0e40213cece4bfaa07009532c Mon Sep 17 00:00:00 2001 From: Tim Wundenberg Date: Mon, 24 Feb 2025 12:56:15 +0100 Subject: [PATCH] feat: initial commit --- .gitea/workflows/build.yaml | 15 +++++++++++++++ .gitea/workflows/buildAndPush.yaml | 18 ++++++++++++++++++ Dockerfile | 7 +++++++ Readme.md | 3 +++ virtualhost.conf | 24 ++++++++++++++++++++++++ 5 files changed, 67 insertions(+) create mode 100644 .gitea/workflows/build.yaml create mode 100644 .gitea/workflows/buildAndPush.yaml create mode 100644 Dockerfile create mode 100644 Readme.md create mode 100644 virtualhost.conf diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..828ff73 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,15 @@ +name: Build Docker Image +on: + push: + branches: + - '**' # matches every branch + - '!prod' + +jobs: + Build-Docker-Image: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - run: docker build . -t nextcloud-test + - run: docker rmi nextcloud-test diff --git a/.gitea/workflows/buildAndPush.yaml b/.gitea/workflows/buildAndPush.yaml new file mode 100644 index 0000000..ac07df7 --- /dev/null +++ b/.gitea/workflows/buildAndPush.yaml @@ -0,0 +1,18 @@ +name: Build and Push Docker Image +on: + push: + branches: + - prod + +jobs: + Build-And-Push-Docker-Image: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - run: docker login git.wundenbergs.de -u tim -p ${{ secrets.DOCKER_GITEA_TOKEN }} + - run: docker build . -t git.wundenbergs.de/x/nextcloud:latest -t git.wundenbergs.de/x/nextcloud:$GITHUB_SHA + - run: docker push git.wundenbergs.de/x/nextcloud:latest + - run: docker push git.wundenbergs.de/x/nextcloud:$GITHUB_SHA + - run: docker rmi git.wundenbergs.de/x/nextcloud:latest git.wundenbergs.de/x/nextcloud:$GITHUB_SHA + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3c328c0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM nextcloud:30.0.6 + + +ENV PHP_UPLOAD_LIMIT: 20G +RUN a2enmod ssl + +COPY ./virtualhost.conf /etc/apache2/sites-enabled/000-default.conf diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..76ae538 --- /dev/null +++ b/Readme.md @@ -0,0 +1,3 @@ +# Custom Nextcloud Image + +This image is a Wrapper around the default nextcloud image to enable SSL Certificates. diff --git a/virtualhost.conf b/virtualhost.conf new file mode 100644 index 0000000..85337c5 --- /dev/null +++ b/virtualhost.conf @@ -0,0 +1,24 @@ + + + ServerAdmin webmaster@localhost + DocumentRoot /var/www/html + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + # ServerName cloud.example.com + + SSLEngine on + SSLCertificateFile /ssl/nextcloud.crt + SSLCertificateKeyFile /ssl/nextcloud.key + + DocumentRoot /var/www/html + # + # Require all granted + # AllowOverride All + # Options FollowSymLinks MultiViews + # + # + # ErrorLog /var/log/apache2/error.log + # CustomLog /var/log/apache2/access.log combined +