From 30b39dcdb5bbd39cf92b7bcc186b7312332fad28 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 10:55:15 +0200 Subject: [PATCH 01/69] Added env to build. --- .github/workflows/docker-image-Laravel.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 23a9a91..c11ad46 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -10,9 +10,9 @@ env: GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} on: push: - branches: [ "master", "develop", "feature/da_add_la_basepackage"] + branches: [ "master", "develop"] pull_request: - branches: [ "master" ] + branches: [ "master", "develop"] jobs: build: runs-on: ubuntu-latest @@ -21,9 +21,15 @@ jobs: - name: Build from Dockerfile id: build-image uses: redhat-actions/buildah-build@v2 + env: + # 🖊️ EDIT to change the image registry settings. + # Registries such as GHCR, Quay.io, and Docker Hub are supported. + COMPOSER_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} + COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{secrets.ACCESS_TOKEN_GITHUB}}"} }' # [tl! **] + GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} with: image: fsw-openshift - tags: latest develop + tags: latest dockerfiles: | ./openshift/openshift.dockerfile - name: Push to registry From 8d712b877421a541a588b6b8cafd69626e4bb955 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 11:08:06 +0200 Subject: [PATCH 02/69] Added secrets --- .github/workflows/docker-image-Laravel.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index c11ad46..cd1dceb 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -8,6 +8,8 @@ env: COMPOSER_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{secrets.ACCESS_TOKEN_GITHUB}}"} }' # [tl! **] GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} + # 🖊️ EDIT to specify custom tags for the container image, or default tags will be generated below. + IMAGE_TAGS: "latest" on: push: branches: [ "master", "develop"] @@ -18,18 +20,22 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Check for required secrets + uses: actions/github-script@v6 + with: + script: | + const secrets = { + ACCESS_TOKEN_GITHUB: `${{ secrets.ACCESS_TOKEN_GITHUB }}`, + ACCESS_TOKEN_GITHUB: `${{ secrets.ACCESS_TOKEN_GITHUB }}`, + }; - name: Build from Dockerfile id: build-image uses: redhat-actions/buildah-build@v2 env: - # 🖊️ EDIT to change the image registry settings. - # Registries such as GHCR, Quay.io, and Docker Hub are supported. - COMPOSER_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} - COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{secrets.ACCESS_TOKEN_GITHUB}}"} }' # [tl! **] - GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} + COMPOSER_TOKEN: ${{ ACCESS_TOKEN_GITHUB }} + COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ACCESS_TOKEN_GITHUB}}"} }' # [tl! **] + GITHUB_TOKEN: ${{ ACCESS_TOKEN_GITHUB }} with: - image: fsw-openshift - tags: latest dockerfiles: | ./openshift/openshift.dockerfile - name: Push to registry From f5c3db5e24b62e07348ae65f7d91415d32f1fb60 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 11:11:30 +0200 Subject: [PATCH 03/69] Changes to the correct dockerfile. --- openshift/openshift.dockerfile | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 191d655..280f665 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -7,23 +7,24 @@ WORKDIR /var/www # upgrades! RUN apt-get update RUN apt-get -y dist-upgrade -RUN apt-get install -y zip +RUN apt-get -qq install -y zip -RUN apt-get install -y sudo nano -RUN apt-get install -y mariadb-client +RUN apt-get -qq install -y sudo nano +RUN apt-get -qq install -y mariadb-client + +RUN apt-get -qq install -y libonig-dev +RUN apt-get -qq install -y curl gnupg # install mysql RUN docker-php-ext-install pdo_mysql mysqli # install additional PHP extensions -RUN apt-get install -y libmcrypt-dev \ +RUN apt-get -qq install -y libmcrypt-dev \ libmagickwand-dev --no-install-recommends \ && pecl install mcrypt-1.0.7 \ && docker-php-ext-install pdo_mysql \ && docker-php-ext-enable mcrypt -RUN apt-get install -y git - RUN apt-get clean -y # set corrent TimeZone @@ -33,7 +34,16 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone # copy webapp files COPY .. /var/www -# install composer +# install & run composer + #COPY ./docker/auth.json /root/.composer/auth.json +RUN echo "COMPOSER_TOKEN" +RUN echo "COMPOSER_TOKEN" +RUN echo $(COMPOSER_TOKEN) +RUN echo "GITHUB_TOKEN" +RUN echo $(GITHUB_TOKEN) +RUN echo "COMPOSER_AUTH" +RUN echo $(COMPOSER_AUTH) > /root/.composer/auth.json + RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer # run composer @@ -51,9 +61,6 @@ RUN chmod ugo+x /entrypoint.sh RUN php artisan optimize -# Expose port 8443 and start php-fpm server -EXPOSE 8080 - ENTRYPOINT /entrypoint.sh CMD ["php-fpm"] From 80e519ed8d3e62d8a34eee66984315392909c9bb Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 11:18:42 +0200 Subject: [PATCH 04/69] Githubactions triggers modified --- .github/workflows/docker-image-Laravel.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index cd1dceb..d2f1f01 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -15,6 +15,7 @@ on: branches: [ "master", "develop"] pull_request: branches: [ "master", "develop"] + types: ["assigned", "opened", "synchronize", "reopened", "edited"] jobs: build: runs-on: ubuntu-latest From 1b3646761b99a67c075ba98f2f0cb64db08972a2 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 11:22:05 +0200 Subject: [PATCH 05/69] update secrets. --- .github/workflows/docker-image-Laravel.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index d2f1f01..075cb73 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -33,9 +33,9 @@ jobs: id: build-image uses: redhat-actions/buildah-build@v2 env: - COMPOSER_TOKEN: ${{ ACCESS_TOKEN_GITHUB }} - COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ACCESS_TOKEN_GITHUB}}"} }' # [tl! **] - GITHUB_TOKEN: ${{ ACCESS_TOKEN_GITHUB }} + COMPOSER_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} + COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.ACCESS_TOKEN_GITHUB}}"} }' # [tl! **] + GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} with: dockerfiles: | ./openshift/openshift.dockerfile From 67f7509c28fb0217465feea7929fbf23de3d6dca Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 11:24:31 +0200 Subject: [PATCH 06/69] Correct image tags. --- .github/workflows/docker-image-Laravel.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 075cb73..5306538 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -37,6 +37,8 @@ jobs: COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.ACCESS_TOKEN_GITHUB}}"} }' # [tl! **] GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} with: + image: fsw-openshift + tags: latest dockerfiles: | ./openshift/openshift.dockerfile - name: Push to registry From 2e61d0fc658886fb6052f3e66d8afed2e6cf3089 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 11:29:41 +0200 Subject: [PATCH 07/69] Deze variables zijn leeg. --- .github/workflows/docker-image-Nginx.yml | 2 +- openshift/openshift.dockerfile | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker-image-Nginx.yml b/.github/workflows/docker-image-Nginx.yml index f6cfed7..8078c8f 100644 --- a/.github/workflows/docker-image-Nginx.yml +++ b/.github/workflows/docker-image-Nginx.yml @@ -7,7 +7,7 @@ env: IMAGE_REGISTRY_PASSWORD: ${{ github.token }} on: push: - branches: [ "master", "develop", "feature/da_opschonen" ] + branches: [ "master", "develop"] pull_request: branches: [ "master" ] jobs: diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 280f665..42cf602 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -35,18 +35,10 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone COPY .. /var/www # install & run composer - #COPY ./docker/auth.json /root/.composer/auth.json -RUN echo "COMPOSER_TOKEN" -RUN echo "COMPOSER_TOKEN" -RUN echo $(COMPOSER_TOKEN) -RUN echo "GITHUB_TOKEN" -RUN echo $(GITHUB_TOKEN) -RUN echo "COMPOSER_AUTH" -RUN echo $(COMPOSER_AUTH) > /root/.composer/auth.json - +#COPY ./docker/auth.json /root/.composer/auth.json RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer -# run composer +# run composer RUN composer install COPY ./openshift/openshift.env /var/www/.env From f14824894b3f036dcc5e8ca2c9529e2a1a11fcea Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 11:32:34 +0200 Subject: [PATCH 08/69] Added git --- openshift/openshift.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 42cf602..1767040 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -13,7 +13,7 @@ RUN apt-get -qq install -y sudo nano RUN apt-get -qq install -y mariadb-client RUN apt-get -qq install -y libonig-dev -RUN apt-get -qq install -y curl gnupg +RUN apt-get -qq install -y curl gnupg git # install mysql RUN docker-php-ext-install pdo_mysql mysqli From de73329c4d4660e746eafaa356852cd0fea00b89 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 13:21:30 +0200 Subject: [PATCH 09/69] Added git 2 --- openshift/openshift.dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 1767040..f4a6c33 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -36,10 +36,11 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json +RUN echo ${COMPSER_AUTH} RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer # run composer -RUN composer install +RUN composer install --prefer-dist --no-suggest --no-progress COPY ./openshift/openshift.env /var/www/.env From f1ee1f56311b2563f544d890a9450ed65efa0a45 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 13:21:40 +0200 Subject: [PATCH 10/69] Added git 2 --- .github/workflows/docker-image-Laravel.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 5306538..05430f0 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -5,16 +5,14 @@ env: IMAGE_REGISTRY: ghcr.io/utrechtuniversity IMAGE_REGISTRY_USER: ${{ github.actor }} IMAGE_REGISTRY_PASSWORD: ${{ github.token }} - COMPOSER_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{secrets.ACCESS_TOKEN_GITHUB}}"} }' # [tl! **] - GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} # 🖊️ EDIT to specify custom tags for the container image, or default tags will be generated below. IMAGE_TAGS: "latest" on: push: branches: [ "master", "develop"] pull_request: - branches: [ "master", "develop"] + branches: [ "master", "feature/**"] types: ["assigned", "opened", "synchronize", "reopened", "edited"] jobs: build: @@ -33,9 +31,7 @@ jobs: id: build-image uses: redhat-actions/buildah-build@v2 env: - COMPOSER_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.ACCESS_TOKEN_GITHUB}}"} }' # [tl! **] - GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} with: image: fsw-openshift tags: latest From bc1a2e3d0439806595ec1f0fe8683b3c368d33d0 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 13:25:00 +0200 Subject: [PATCH 11/69] Added git 2 --- .github/workflows/docker-image-Laravel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 05430f0..95bafc3 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -12,7 +12,7 @@ on: push: branches: [ "master", "develop"] pull_request: - branches: [ "master", "feature/**"] + branches: [ "master", "develop", "feature/**"] types: ["assigned", "opened", "synchronize", "reopened", "edited"] jobs: build: From 039205b45a6a2210ae12c64ddbe3188f0b12311c Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 13:28:04 +0200 Subject: [PATCH 12/69] Added git 3 --- openshift/openshift.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index f4a6c33..0dedcfe 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -36,7 +36,7 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json -RUN echo ${COMPSER_AUTH} +RUN echo $(COMPOSER_AUTH) RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer # run composer From 2af080c400079bf3b8425b91a51f779163100ef2 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 13:45:53 +0200 Subject: [PATCH 13/69] Added git 4 --- .github/workflows/docker-image-Laravel.yml | 7 +++---- openshift/openshift.dockerfile | 5 ++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 95bafc3..c160fee 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -5,7 +5,7 @@ env: IMAGE_REGISTRY: ghcr.io/utrechtuniversity IMAGE_REGISTRY_USER: ${{ github.actor }} IMAGE_REGISTRY_PASSWORD: ${{ github.token }} - COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{secrets.ACCESS_TOKEN_GITHUB}}"} }' # [tl! **] + COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{secrets.COMPOSER_AUTH}}"} }' # [tl! **] # 🖊️ EDIT to specify custom tags for the container image, or default tags will be generated below. IMAGE_TAGS: "latest" on: @@ -24,14 +24,13 @@ jobs: with: script: | const secrets = { - ACCESS_TOKEN_GITHUB: `${{ secrets.ACCESS_TOKEN_GITHUB }}`, - ACCESS_TOKEN_GITHUB: `${{ secrets.ACCESS_TOKEN_GITHUB }}`, + COMPOSER_AUTH: `${{ secrets.COMPOSER_AUTH }}`, }; - name: Build from Dockerfile id: build-image uses: redhat-actions/buildah-build@v2 env: - COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.ACCESS_TOKEN_GITHUB}}"} }' # [tl! **] + COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.COMPOSER_AUTH}}"} }' # [tl! **] with: image: fsw-openshift tags: latest diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 0dedcfe..d38940e 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -36,10 +36,13 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json -RUN echo $(COMPOSER_AUTH) + +RUN echo ${{COMPOSER_AUTH}} +RUN echo ${COMPOSER_AUTH} RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer # run composer +RUN composer config --global --auth github-oauth.github.com ${COMPOSER_AUTH} RUN composer install --prefer-dist --no-suggest --no-progress COPY ./openshift/openshift.env /var/www/.env From c6b4639f544ccd6b7dd009725f9fed67e4c97911 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 13:50:38 +0200 Subject: [PATCH 14/69] Added git 5 --- .github/workflows/docker-image-Laravel.yml | 7 +++++-- openshift/openshift.dockerfile | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index c160fee..532aa22 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -5,7 +5,8 @@ env: IMAGE_REGISTRY: ghcr.io/utrechtuniversity IMAGE_REGISTRY_USER: ${{ github.actor }} IMAGE_REGISTRY_PASSWORD: ${{ github.token }} - COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{secrets.COMPOSER_AUTH}}"} }' # [tl! **] + COMPOSER_AUTH: {{secrets.COMPOSER_AUTH}} + COMPOSER_AUTH_JSON: '{"github-oauth": {"github.com": "${{secrets.COMPOSER_AUTH}}"} }' # [tl! **] # 🖊️ EDIT to specify custom tags for the container image, or default tags will be generated below. IMAGE_TAGS: "latest" on: @@ -25,12 +26,14 @@ jobs: script: | const secrets = { COMPOSER_AUTH: `${{ secrets.COMPOSER_AUTH }}`, + COMPOSER_AUTH_JSON: '{"github-oauth": {"github.com": "${{secrets.COMPOSER_AUTH}}"} }' # [tl! **] }; - name: Build from Dockerfile id: build-image uses: redhat-actions/buildah-build@v2 env: - COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.COMPOSER_AUTH}}"} }' # [tl! **] + COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} + COMPOSER_AUTH_JSON: '{"github-oauth": {"github.com": "${{secrets.COMPOSER_AUTH}}"} }' # [tl! **] with: image: fsw-openshift tags: latest diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index d38940e..3cb5c99 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -37,8 +37,8 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json -RUN echo ${{COMPOSER_AUTH}} RUN echo ${COMPOSER_AUTH} +RUN echo ${COMPOSER_AUTH_JSON} RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer # run composer From 6e2505d756a668d912879fbd808cb0958e35a9dd Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 13:51:23 +0200 Subject: [PATCH 15/69] Added git 5 --- .github/workflows/docker-image-Laravel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 532aa22..8dfd87a 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -5,7 +5,7 @@ env: IMAGE_REGISTRY: ghcr.io/utrechtuniversity IMAGE_REGISTRY_USER: ${{ github.actor }} IMAGE_REGISTRY_PASSWORD: ${{ github.token }} - COMPOSER_AUTH: {{secrets.COMPOSER_AUTH}} + COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} COMPOSER_AUTH_JSON: '{"github-oauth": {"github.com": "${{secrets.COMPOSER_AUTH}}"} }' # [tl! **] # 🖊️ EDIT to specify custom tags for the container image, or default tags will be generated below. IMAGE_TAGS: "latest" From 30e9831a32ff12548262f735244ece96c0d1e0bb Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 13:55:01 +0200 Subject: [PATCH 16/69] Added git 6 --- .github/workflows/docker-image-Laravel.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 8dfd87a..bf949e4 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -25,8 +25,7 @@ jobs: with: script: | const secrets = { - COMPOSER_AUTH: `${{ secrets.COMPOSER_AUTH }}`, - COMPOSER_AUTH_JSON: '{"github-oauth": {"github.com": "${{secrets.COMPOSER_AUTH}}"} }' # [tl! **] + COMPOSER_AUTH: `${{ secrets.COMPOSER_AUTH }}` }; - name: Build from Dockerfile id: build-image From 8e5b9be96cdf1fc1e6d6bce0ff181abfe07e785e Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 14:10:46 +0200 Subject: [PATCH 17/69] Added git 6 --- .github/workflows/docker-image-Laravel.yml | 3 +-- openshift/openshift.dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index bf949e4..4d9a0e8 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -31,8 +31,7 @@ jobs: id: build-image uses: redhat-actions/buildah-build@v2 env: - COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} - COMPOSER_AUTH_JSON: '{"github-oauth": {"github.com": "${{secrets.COMPOSER_AUTH}}"} }' # [tl! **] + COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{secrets.COMPOSER_AUTH}}"} }' # [tl! **] with: image: fsw-openshift tags: latest diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 3cb5c99..2d54cd4 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -38,11 +38,11 @@ COPY .. /var/www #COPY ./docker/auth.json /root/.composer/auth.json RUN echo ${COMPOSER_AUTH} -RUN echo ${COMPOSER_AUTH_JSON} +#RUN echo ${COMPOSER_AUTH_JSON} RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer # run composer -RUN composer config --global --auth github-oauth.github.com ${COMPOSER_AUTH} +#RUN composer config --global --auth github-oauth.github.com ${COMPOSER_AUTH} RUN composer install --prefer-dist --no-suggest --no-progress COPY ./openshift/openshift.env /var/www/.env From f823a3ff7d87e32b11c72a137093761ad0dfc562 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 14:15:29 +0200 Subject: [PATCH 18/69] Added git 7 --- docker/backend.dockerfile | 16 ++++------------ openshift/openshift.dockerfile | 6 ++++-- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/docker/backend.dockerfile b/docker/backend.dockerfile index 3ed4ffc..d21408f 100644 --- a/docker/backend.dockerfile +++ b/docker/backend.dockerfile @@ -5,7 +5,7 @@ COPY composer.lock composer.json /var/www/ WORKDIR /var/www # upgrades! -RUN apt-get update -y +RUN apt-get update RUN apt-get -y dist-upgrade RUN apt-get -qq install -y zip @@ -13,7 +13,7 @@ RUN apt-get -qq install -y sudo nano RUN apt-get -qq install -y mariadb-client RUN apt-get -qq install -y libonig-dev -RUN apt-get -qq install -y ca-certificates curl gnupg +RUN apt-get -qq install -y ca-certificates curl gnupg git # required for sending mail. RUN apt-get -qq install -y sendmail @@ -45,18 +45,10 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone COPY .. /var/www # install & run composer - #COPY ./docker/auth.json /root/.composer/auth.json -RUN echo "COMPOSER_TOKEN" -RUN echo "COMPOSER_TOKEN" -RUN echo $(COMPOSER_TOKEN) -RUN echo "GITHUB_TOKEN" -RUN echo $(GITHUB_TOKEN) -RUN echo "COMPOSER_AUTH" -RUN echo $(COMPOSER_AUTH) > /root/.composer/auth.json - +COPY ./docker/auth.json /root/.composer/auth.json RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer -# run composer +# run composer RUN composer install # install self signed certifcates to thrust other local dev environments diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 2d54cd4..bcf6fff 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -37,13 +37,15 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json -RUN echo ${COMPOSER_AUTH} +RUN echo $COMPOSER_AUTH +RUN echo $COMPOSER_AUTH_JSON #RUN echo ${COMPOSER_AUTH_JSON} RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer # run composer #RUN composer config --global --auth github-oauth.github.com ${COMPOSER_AUTH} -RUN composer install --prefer-dist --no-suggest --no-progress +RUN composer update && composer install --prefer-dist --no-suggest --no-progress +#RUN composer install --prefer-dist --no-suggest --no-progress COPY ./openshift/openshift.env /var/www/.env From 0bb746f308753b9112e4d26ba2c43735d955a72e Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 14:30:20 +0200 Subject: [PATCH 19/69] Added git 8 --- .github/workflows/docker-image-Laravel.yml | 12 +++--------- openshift/openshift.dockerfile | 4 ++-- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 4d9a0e8..175aa7f 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -5,8 +5,8 @@ env: IMAGE_REGISTRY: ghcr.io/utrechtuniversity IMAGE_REGISTRY_USER: ${{ github.actor }} IMAGE_REGISTRY_PASSWORD: ${{ github.token }} - COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} - COMPOSER_AUTH_JSON: '{"github-oauth": {"github.com": "${{secrets.COMPOSER_AUTH}}"} }' # [tl! **] + COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} + COMPOSER_AUTH_JSON: '{"github-oauth": {"github.com": "${{ secrets.COMPOSER_AUTH }}"} }' # [tl! **] # 🖊️ EDIT to specify custom tags for the container image, or default tags will be generated below. IMAGE_TAGS: "latest" on: @@ -22,17 +22,11 @@ jobs: - uses: actions/checkout@v4 - name: Check for required secrets uses: actions/github-script@v6 - with: - script: | - const secrets = { - COMPOSER_AUTH: `${{ secrets.COMPOSER_AUTH }}` - }; - name: Build from Dockerfile id: build-image uses: redhat-actions/buildah-build@v2 - env: - COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{secrets.COMPOSER_AUTH}}"} }' # [tl! **] with: + COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ env.COMPOSER_AUTH }}"} }' # [tl! **] image: fsw-openshift tags: latest dockerfiles: | diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index bcf6fff..c19e8cc 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -37,8 +37,8 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json -RUN echo $COMPOSER_AUTH -RUN echo $COMPOSER_AUTH_JSON +#RUN #echo $COMPOSER_AUTH +#RUN echo ${COMPOSER_AUTH_JSON} > /root/.composer/auth.json #RUN echo ${COMPOSER_AUTH_JSON} RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer From 3de668caa42e861e18a62f6231a4be71c5d14388 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 14:36:24 +0200 Subject: [PATCH 20/69] Added git 8 --- .github/workflows/docker-image-Laravel.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 175aa7f..874b1cc 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -19,9 +19,8 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Check for required secrets - uses: actions/github-script@v6 + - name: Checkout code + uses: actions/checkout@v4 - name: Build from Dockerfile id: build-image uses: redhat-actions/buildah-build@v2 From deff20fdde2b39fd9ac02fdf16ed81f766739299 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 14:41:53 +0200 Subject: [PATCH 21/69] Added git 9 --- .github/workflows/docker-image-Laravel.yml | 3 ++- openshift/openshift.dockerfile | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 874b1cc..166bee5 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -24,8 +24,9 @@ jobs: - name: Build from Dockerfile id: build-image uses: redhat-actions/buildah-build@v2 - with: + env: COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ env.COMPOSER_AUTH }}"} }' # [tl! **] + with: image: fsw-openshift tags: latest dockerfiles: | diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index c19e8cc..c936853 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -37,14 +37,15 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json -#RUN #echo $COMPOSER_AUTH +RUN echo ${ COMPOSER_AUTH } +RUN echo ${ env.COMPOSER_AUTH } #RUN echo ${COMPOSER_AUTH_JSON} > /root/.composer/auth.json #RUN echo ${COMPOSER_AUTH_JSON} RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer # run composer #RUN composer config --global --auth github-oauth.github.com ${COMPOSER_AUTH} -RUN composer update && composer install --prefer-dist --no-suggest --no-progress +RUN composer install --prefer-dist --no-suggest --no-progress --no-interaction #RUN composer install --prefer-dist --no-suggest --no-progress COPY ./openshift/openshift.env /var/www/.env From 21c2c3aca8b86a4ad03a21a9bcf19fecb722b78e Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 14:43:42 +0200 Subject: [PATCH 22/69] Added git 9 --- openshift/openshift.dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index c936853..c135fa9 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -37,8 +37,8 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json -RUN echo ${ COMPOSER_AUTH } -RUN echo ${ env.COMPOSER_AUTH } +#RUN echo ${ COMPOSER_AUTH } +#RUN echo ${ env.COMPOSER_AUTH } #RUN echo ${COMPOSER_AUTH_JSON} > /root/.composer/auth.json #RUN echo ${COMPOSER_AUTH_JSON} RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer From 93179ccadd431b9c08365ff2ce419ff3ab2ff691 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 14:55:42 +0200 Subject: [PATCH 23/69] test --- .github/workflows/docker-image.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..4922ec6 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,18 @@ +name: Docker Image CI + +on: + push: + branches: [ "develop" ] + pull_request: + branches: [ "develop" ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build the Docker image + run: docker build . --file ./openshift/openshift.dockerfile --tag my-image-name:$(date +%s) From 347e52b83e13a7bc7f73358e71c87a16b7308796 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 14:59:24 +0200 Subject: [PATCH 24/69] Added git 9 --- openshift/openshift.dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index c135fa9..02641a8 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -39,7 +39,9 @@ COPY .. /var/www #RUN echo ${ COMPOSER_AUTH } #RUN echo ${ env.COMPOSER_AUTH } -#RUN echo ${COMPOSER_AUTH_JSON} > /root/.composer/auth.json +RUN cat /root/.composer/auth.json +RUN echo ${COMPOSER_AUTH} > /root/.composer/auth.json +RUN cat /root/.composer/auth.json #RUN echo ${COMPOSER_AUTH_JSON} RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer From 379444c6117a2c53e4d2f2abe0795b07e727bfcf Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 15:01:20 +0200 Subject: [PATCH 25/69] Added git 9 --- openshift/openshift.dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 02641a8..f8eec1f 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -39,7 +39,6 @@ COPY .. /var/www #RUN echo ${ COMPOSER_AUTH } #RUN echo ${ env.COMPOSER_AUTH } -RUN cat /root/.composer/auth.json RUN echo ${COMPOSER_AUTH} > /root/.composer/auth.json RUN cat /root/.composer/auth.json #RUN echo ${COMPOSER_AUTH_JSON} From 790b567106cb0fc7f21cb98fda1e673520f08fce Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 15:05:23 +0200 Subject: [PATCH 26/69] Added git 10 --- openshift/openshift.dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index f8eec1f..4a57613 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -44,6 +44,7 @@ RUN cat /root/.composer/auth.json #RUN echo ${COMPOSER_AUTH_JSON} RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer +RUN composer diagnose # run composer #RUN composer config --global --auth github-oauth.github.com ${COMPOSER_AUTH} RUN composer install --prefer-dist --no-suggest --no-progress --no-interaction From 8773f06421f0ec97539f5d7bdbdb3abecb05ec0d Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 15:09:59 +0200 Subject: [PATCH 27/69] Added git 11 --- .github/workflows/docker-image-Laravel.yml | 3 ++- openshift/openshift.dockerfile | 12 +++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 166bee5..ce14888 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -25,7 +25,8 @@ jobs: id: build-image uses: redhat-actions/buildah-build@v2 env: - COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ env.COMPOSER_AUTH }}"} }' # [tl! **] + COMPOSER_AUTH: ${{ env.COMPOSER_AUTH }} +# COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ env.COMPOSER_AUTH }}"} }' # [tl! **] with: image: fsw-openshift tags: latest diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 4a57613..a4b56a0 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -39,14 +39,20 @@ COPY .. /var/www #RUN echo ${ COMPOSER_AUTH } #RUN echo ${ env.COMPOSER_AUTH } -RUN echo ${COMPOSER_AUTH} > /root/.composer/auth.json -RUN cat /root/.composer/auth.json + #RUN echo ${COMPOSER_AUTH_JSON} RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer RUN composer diagnose # run composer -#RUN composer config --global --auth github-oauth.github.com ${COMPOSER_AUTH} +RUN composer config --global --auth github-oauth.github.com ${COMPOSER_AUTH} + +RUN composer diagnose +# run composer +RUN composer config --global --auth github-oauth.github.com ${env.COMPOSER_AUTH} + +RUN composer diagnose + RUN composer install --prefer-dist --no-suggest --no-progress --no-interaction #RUN composer install --prefer-dist --no-suggest --no-progress From e0d1aba89eb2947dc467644e827f3cc082fcd6b0 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 15:16:24 +0200 Subject: [PATCH 28/69] Added git 11 --- openshift/openshift.dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index a4b56a0..46d57ca 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -45,9 +45,7 @@ RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/lo RUN composer diagnose # run composer -RUN composer config --global --auth github-oauth.github.com ${COMPOSER_AUTH} -RUN composer diagnose # run composer RUN composer config --global --auth github-oauth.github.com ${env.COMPOSER_AUTH} From 634d1d992341cf440f30e3755b71a73dc63bea7c Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 15:20:11 +0200 Subject: [PATCH 29/69] Added git 11 --- openshift/openshift.dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 46d57ca..e079618 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -37,8 +37,8 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json -#RUN echo ${ COMPOSER_AUTH } -#RUN echo ${ env.COMPOSER_AUTH } +RUN echo ${{COMPOSER_AUTH}} +RUN echo ${{env.COMPOSER_AUTH}} #RUN echo ${COMPOSER_AUTH_JSON} RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer @@ -47,7 +47,7 @@ RUN composer diagnose # run composer # run composer -RUN composer config --global --auth github-oauth.github.com ${env.COMPOSER_AUTH} +RUN composer config --global --auth github-oauth.github.com ${{ env.COMPOSER_AUTH }} RUN composer diagnose From ac774e27a7656a2096ce2882daf734c73d448ddb Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 15:25:41 +0200 Subject: [PATCH 30/69] Added git 11 --- .github/workflows/docker-image-Laravel.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index ce14888..b3cc64f 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -28,6 +28,7 @@ jobs: COMPOSER_AUTH: ${{ env.COMPOSER_AUTH }} # COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ env.COMPOSER_AUTH }}"} }' # [tl! **] with: + env: ${{ env.COMPOSER_AUTH }} image: fsw-openshift tags: latest dockerfiles: | From 6b2e00cd497d0c3e0765f920f857735e24b29f63 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 15:25:49 +0200 Subject: [PATCH 31/69] Added git 11 --- openshift/openshift.dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index e079618..4edb975 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -36,9 +36,8 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json - -RUN echo ${{COMPOSER_AUTH}} -RUN echo ${{env.COMPOSER_AUTH}} +RUN echo ${env} +RUN echo ${env.COMPOSER_AUTH} #RUN echo ${COMPOSER_AUTH_JSON} RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer @@ -47,7 +46,7 @@ RUN composer diagnose # run composer # run composer -RUN composer config --global --auth github-oauth.github.com ${{ env.COMPOSER_AUTH }} +RUN composer config --global --auth github-oauth.github.com ${ env.COMPOSER_AUTH } RUN composer diagnose From 65244676818f5b1499d5e8c65bf3106f85d11b68 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 15:28:31 +0200 Subject: [PATCH 32/69] Added git 11 --- .github/workflows/docker-image-Laravel.yml | 2 +- openshift/openshift.dockerfile | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index b3cc64f..4d6bb61 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -28,7 +28,7 @@ jobs: COMPOSER_AUTH: ${{ env.COMPOSER_AUTH }} # COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ env.COMPOSER_AUTH }}"} }' # [tl! **] with: - env: ${{ env.COMPOSER_AUTH }} + COMPOSER_AUTH: ${{ env.COMPOSER_AUTH }} image: fsw-openshift tags: latest dockerfiles: | diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 4edb975..0f30143 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -36,8 +36,9 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json -RUN echo ${env} -RUN echo ${env.COMPOSER_AUTH} + +RUN echo $COMPOSER_AUTH + #RUN echo ${COMPOSER_AUTH_JSON} RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer @@ -46,7 +47,7 @@ RUN composer diagnose # run composer # run composer -RUN composer config --global --auth github-oauth.github.com ${ env.COMPOSER_AUTH } +RUN composer config --global --auth github-oauth.github.com $COMPOSER_AUTH RUN composer diagnose From 8d33190fe6aa0ca3553e9f2e5620e12c7aeb3ff3 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 15:31:27 +0200 Subject: [PATCH 33/69] Added git 11 --- .github/workflows/docker-image-Laravel.yml | 2 +- openshift/openshift.dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 4d6bb61..636381a 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -28,7 +28,7 @@ jobs: COMPOSER_AUTH: ${{ env.COMPOSER_AUTH }} # COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ env.COMPOSER_AUTH }}"} }' # [tl! **] with: - COMPOSER_AUTH: ${{ env.COMPOSER_AUTH }} + envs: ${{ env.COMPOSER_AUTH }} image: fsw-openshift tags: latest dockerfiles: | diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 0f30143..63d48eb 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -37,7 +37,7 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json -RUN echo $COMPOSER_AUTH +RUN echo $ENVS #RUN echo ${COMPOSER_AUTH_JSON} @@ -47,7 +47,7 @@ RUN composer diagnose # run composer # run composer -RUN composer config --global --auth github-oauth.github.com $COMPOSER_AUTH +RUN composer config --global --auth github-oauth.github.com $ENVS RUN composer diagnose From 0d8044a803247bed9c7dae0fe8c77499deed772d Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 15:33:34 +0200 Subject: [PATCH 34/69] Added git 11 --- .github/workflows/docker-image-Laravel.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 636381a..b7b8096 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -25,10 +25,11 @@ jobs: id: build-image uses: redhat-actions/buildah-build@v2 env: - COMPOSER_AUTH: ${{ env.COMPOSER_AUTH }} + composer_auth: 'test123123123' + #${{ env.COMPOSER_AUTH }} # COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ env.COMPOSER_AUTH }}"} }' # [tl! **] with: - envs: ${{ env.COMPOSER_AUTH }} + envs: 'testABABAABABA' image: fsw-openshift tags: latest dockerfiles: | From ec14019b5cd79719bcab580b0b0285ceb6770c5a Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 15:34:24 +0200 Subject: [PATCH 35/69] Added git 11 --- openshift/openshift.dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 63d48eb..ffd8138 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -39,6 +39,7 @@ COPY .. /var/www RUN echo $ENVS +RUN echo $COMPOSER_AUTH #RUN echo ${COMPOSER_AUTH_JSON} RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer @@ -47,7 +48,7 @@ RUN composer diagnose # run composer # run composer -RUN composer config --global --auth github-oauth.github.com $ENVS +RUN composer config --global --auth github-oauth.github.com $COMPOSER_AUTH RUN composer diagnose From b54bfcb3035e6fd1069c31b9a4f88761a0ead138 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 15:40:44 +0200 Subject: [PATCH 36/69] Added git 11 --- openshift/openshift.dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index ffd8138..be63045 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -36,10 +36,12 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json +RUN echo "${IMAGE}" +RUN echo "${ENVS}" +RUN echo "${ENV}" -RUN echo $ENVS - -RUN echo $COMPOSER_AUTH +RUN echo "${COMPOSER_AUTH}" +RUN echo "${composer_auth}" #RUN echo ${COMPOSER_AUTH_JSON} RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer @@ -48,7 +50,7 @@ RUN composer diagnose # run composer # run composer -RUN composer config --global --auth github-oauth.github.com $COMPOSER_AUTH +RUN composer config --global --auth github-oauth.github.com "${COMPOSER_AUTH}" RUN composer diagnose From 289fdfdd583aa0fb5698bde3f3ae24d9fd7c347a Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 15:48:21 +0200 Subject: [PATCH 37/69] Added git 11 --- storage/logs/laravel.log | 76 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/storage/logs/laravel.log b/storage/logs/laravel.log index e69de29..3a36c36 100644 --- a/storage/logs/laravel.log +++ b/storage/logs/laravel.log @@ -0,0 +1,76 @@ +[2024-07-01 11:33:02] local.ERROR: SQLSTATE[HY000] [2002] Connection refused (Connection: mysql, SQL: select table_name as `name`, (data_length + index_length) as `size`, table_comment as `comment`, engine as `engine`, table_collation as `collation` from information_schema.tables where table_schema = 'development' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED') order by table_name) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 2002): SQLSTATE[HY000] [2002] Connection refused (Connection: mysql, SQL: select table_name as `name`, (data_length + index_length) as `size`, table_comment as `comment`, engine as `engine`, table_collation as `collation` from information_schema.tables where table_schema = 'development' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED') order by table_name) at /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:829) +[stacktrace] +#0 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(983): Illuminate\\Database\\Connection->runQueryCallback('select table_na...', Array, Object(Closure)) +#1 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(962): Illuminate\\Database\\Connection->tryAgainIfCausedByLostConnection(Object(Illuminate\\Database\\QueryException), 'select table_na...', Array, Object(Closure)) +#2 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(785): Illuminate\\Database\\Connection->handleQueryException(Object(Illuminate\\Database\\QueryException), 'select table_na...', Array, Object(Closure)) +#3 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(414): Illuminate\\Database\\Connection->run('select table_na...', Array, Object(Closure)) +#4 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(401): Illuminate\\Database\\Connection->select('select table_na...', Array, false) +#5 /var/www/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php(41): Illuminate\\Database\\Connection->selectFromWriteConnection('select table_na...') +#6 /var/www/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(165): Illuminate\\Database\\Schema\\MySqlBuilder->getTables(false) +#7 /var/www/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php(184): Illuminate\\Database\\Schema\\Builder->hasTable('migrations') +#8 /var/www/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(700): Illuminate\\Database\\Migrations\\DatabaseMigrationRepository->repositoryExists() +#9 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(140): Illuminate\\Database\\Migrations\\Migrator->repositoryExists() +#10 /var/www/vendor/laravel/framework/src/Illuminate/Support/helpers.php(248): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->Illuminate\\Database\\Console\\Migrations\\{closure}(1) +#11 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(140): retry(1, Object(Closure), 0, Object(Closure)) +#12 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(116): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->repositoryExists() +#13 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(84): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->prepareDatabase() +#14 /var/www/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(633): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->Illuminate\\Database\\Console\\Migrations\\{closure}() +#15 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(83): Illuminate\\Database\\Migrations\\Migrator->usingConnection(NULL, Object(Closure)) +#16 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->handle() +#17 /var/www/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}() +#18 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure)) +#19 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure)) +#20 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL) +#21 /var/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\\Container\\Container->call(Array) +#22 /var/www/vendor/symfony/console/Command/Command.php(326): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle)) +#23 /var/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle)) +#24 /var/www/vendor/symfony/console/Application.php(1096): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) +#25 /var/www/vendor/symfony/console/Application.php(324): Symfony\\Component\\Console\\Application->doRunCommand(Object(Illuminate\\Database\\Console\\Migrations\\MigrateCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) +#26 /var/www/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) +#27 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) +#28 /var/www/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) +#29 {main} + +[previous exception] [object] (PDOException(code: 2002): SQLSTATE[HY000] [2002] Connection refused at /var/www/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:65) +[stacktrace] +#0 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(65): PDO->__construct('mysql:host=mari...', 'development', Object(SensitiveParameterValue), Array) +#1 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(83): Illuminate\\Database\\Connectors\\Connector->createPdoConnection('mysql:host=mari...', 'development', 'secret', Array) +#2 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(48): Illuminate\\Database\\Connectors\\Connector->tryAgainIfCausedByLostConnection(Object(PDOException), 'mysql:host=mari...', 'development', 'secret', Array) +#3 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\\Database\\Connectors\\Connector->createConnection('mysql:host=mari...', Array, Array) +#4 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(184): Illuminate\\Database\\Connectors\\MySqlConnector->connect(Array) +#5 [internal function]: Illuminate\\Database\\Connectors\\ConnectionFactory->Illuminate\\Database\\Connectors\\{closure}() +#6 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(1339): call_user_func(Object(Closure)) +#7 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(528): Illuminate\\Database\\Connection->getPdo() +#8 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(423): Illuminate\\Database\\Connection->getPdoForSelect(false) +#9 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(816): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}('select table_na...', Array) +#10 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(983): Illuminate\\Database\\Connection->runQueryCallback('select table_na...', Array, Object(Closure)) +#11 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(962): Illuminate\\Database\\Connection->tryAgainIfCausedByLostConnection(Object(Illuminate\\Database\\QueryException), 'select table_na...', Array, Object(Closure)) +#12 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(785): Illuminate\\Database\\Connection->handleQueryException(Object(Illuminate\\Database\\QueryException), 'select table_na...', Array, Object(Closure)) +#13 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(414): Illuminate\\Database\\Connection->run('select table_na...', Array, Object(Closure)) +#14 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(401): Illuminate\\Database\\Connection->select('select table_na...', Array, false) +#15 /var/www/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php(41): Illuminate\\Database\\Connection->selectFromWriteConnection('select table_na...') +#16 /var/www/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(165): Illuminate\\Database\\Schema\\MySqlBuilder->getTables(false) +#17 /var/www/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php(184): Illuminate\\Database\\Schema\\Builder->hasTable('migrations') +#18 /var/www/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(700): Illuminate\\Database\\Migrations\\DatabaseMigrationRepository->repositoryExists() +#19 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(140): Illuminate\\Database\\Migrations\\Migrator->repositoryExists() +#20 /var/www/vendor/laravel/framework/src/Illuminate/Support/helpers.php(248): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->Illuminate\\Database\\Console\\Migrations\\{closure}(1) +#21 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(140): retry(1, Object(Closure), 0, Object(Closure)) +#22 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(116): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->repositoryExists() +#23 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(84): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->prepareDatabase() +#24 /var/www/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(633): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->Illuminate\\Database\\Console\\Migrations\\{closure}() +#25 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(83): Illuminate\\Database\\Migrations\\Migrator->usingConnection(NULL, Object(Closure)) +#26 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->handle() +#27 /var/www/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}() +#28 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure)) +#29 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure)) +#30 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL) +#31 /var/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\\Container\\Container->call(Array) +#32 /var/www/vendor/symfony/console/Command/Command.php(326): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle)) +#33 /var/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle)) +#34 /var/www/vendor/symfony/console/Application.php(1096): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) +#35 /var/www/vendor/symfony/console/Application.php(324): Symfony\\Component\\Console\\Application->doRunCommand(Object(Illuminate\\Database\\Console\\Migrations\\MigrateCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) +#36 /var/www/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) +#37 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) +#38 /var/www/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) +#39 {main} +"} From 827961a7f5427323e6cad3d001d80052506eaa0e Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 15:48:27 +0200 Subject: [PATCH 38/69] Added git 11 --- openshift/openshift.dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index be63045..b54f3eb 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -36,12 +36,12 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json -RUN echo "${IMAGE}" -RUN echo "${ENVS}" -RUN echo "${ENV}" +RUN echo ${IMAGE} +RUN echo ${ENVS} +RUN echo ${ENV} -RUN echo "${COMPOSER_AUTH}" -RUN echo "${composer_auth}" +RUN echo ${COMPOSER_AUTH} +RUN echo ${composer_auth} #RUN echo ${COMPOSER_AUTH_JSON} RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer @@ -50,7 +50,7 @@ RUN composer diagnose # run composer # run composer -RUN composer config --global --auth github-oauth.github.com "${COMPOSER_AUTH}" +RUN composer config --global --auth github-oauth.github.com ${COMPOSER_AUTH} RUN composer diagnose From 323c8faa3c2e1536f0c4defba8f93a3fea8b372a Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 15:57:30 +0200 Subject: [PATCH 39/69] Added git 11 --- .github/workflows/docker-image-Laravel.yml | 11 +++++++---- openshift/openshift.dockerfile | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index b7b8096..8df94ad 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -24,12 +24,15 @@ jobs: - name: Build from Dockerfile id: build-image uses: redhat-actions/buildah-build@v2 - env: - composer_auth: 'test123123123' - #${{ env.COMPOSER_AUTH }} + run: | + curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer + composer config --global --auth github-oauth.github.com ${{ COMPOSER_AUTH }} +# COMPOSER_AUTH: 'test123123123' +# #${{ env.COMPOSER_AUTH }} # COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ env.COMPOSER_AUTH }}"} }' # [tl! **] with: - envs: 'testABABAABABA' + envs: + string: 'test123123123' image: fsw-openshift tags: latest dockerfiles: | diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index b54f3eb..02b4e08 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -43,6 +43,7 @@ RUN echo ${ENV} RUN echo ${COMPOSER_AUTH} RUN echo ${composer_auth} +# RUN #composer diagnose #RUN echo ${COMPOSER_AUTH_JSON} RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer From 36c89e732c3c4f29d65877722f8e8bd07c1409fd Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 16:03:11 +0200 Subject: [PATCH 40/69] Added git 11 --- openshift/openshift.dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 02b4e08..b0716d6 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -36,12 +36,12 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json -RUN echo ${IMAGE} -RUN echo ${ENVS} -RUN echo ${ENV} +RUN echo "$IMAGE" +RUN echo "$ENVS" +RUN echo "$ENV" -RUN echo ${COMPOSER_AUTH} -RUN echo ${composer_auth} +RUN echo "$COMPOSER_AUTH" +RUN echo "$composer_auth" # RUN #composer diagnose #RUN echo ${COMPOSER_AUTH_JSON} @@ -51,7 +51,7 @@ RUN composer diagnose # run composer # run composer -RUN composer config --global --auth github-oauth.github.com ${COMPOSER_AUTH} +RUN composer config --global --auth github-oauth.github.com "$COMPOSER_AUTH" RUN composer diagnose From ade4e9ea1672b039e4af05f5dda368e468a7e3e4 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 16:05:18 +0200 Subject: [PATCH 41/69] Added git 11 --- .github/workflows/docker-image-Laravel.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 8df94ad..fa39049 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -24,15 +24,12 @@ jobs: - name: Build from Dockerfile id: build-image uses: redhat-actions/buildah-build@v2 - run: | - curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer - composer config --global --auth github-oauth.github.com ${{ COMPOSER_AUTH }} -# COMPOSER_AUTH: 'test123123123' -# #${{ env.COMPOSER_AUTH }} + env: + COMPOSER_AUTH: 'test123123123' + #${{ env.COMPOSER_AUTH }} # COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ env.COMPOSER_AUTH }}"} }' # [tl! **] with: - envs: - string: 'test123123123' + envs: 'testABABAABABA' image: fsw-openshift tags: latest dockerfiles: | From 69c87226436b5f45d1946763720265fc92ee3979 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 16:21:57 +0200 Subject: [PATCH 42/69] Over een andere boeg --- .github/workflows/docker-image-Laravel.yml | 91 +++++++++++++--------- 1 file changed, 55 insertions(+), 36 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index fa39049..768b521 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -1,45 +1,64 @@ -name: Docker Image Laravel -env: - # 🖊️ EDIT to change the image registry settings. - # Registries such as GHCR, Quay.io, and Docker Hub are supported. - IMAGE_REGISTRY: ghcr.io/utrechtuniversity - IMAGE_REGISTRY_USER: ${{ github.actor }} - IMAGE_REGISTRY_PASSWORD: ${{ github.token }} - COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} - COMPOSER_AUTH_JSON: '{"github-oauth": {"github.com": "${{ secrets.COMPOSER_AUTH }}"} }' # [tl! **] - # 🖊️ EDIT to specify custom tags for the container image, or default tags will be generated below. - IMAGE_TAGS: "latest" +# +name: Create and publish a Docker image + +# Configures this workflow to run every time a change is pushed to the branch called `release`. on: push: branches: [ "master", "develop"] pull_request: branches: [ "master", "develop", "feature/**"] types: ["assigned", "opened", "synchronize", "reopened", "edited"] + +# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. jobs: - build: + build-and-push-image: runs-on: ubuntu-latest + # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. + permissions: + contents: read + packages: write + attestations: write + id-token: write + # steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Build from Dockerfile - id: build-image - uses: redhat-actions/buildah-build@v2 - env: - COMPOSER_AUTH: 'test123123123' - #${{ env.COMPOSER_AUTH }} -# COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ env.COMPOSER_AUTH }}"} }' # [tl! **] - with: - envs: 'testABABAABABA' - image: fsw-openshift - tags: latest - dockerfiles: | - ./openshift/openshift.dockerfile - - name: Push to registry - id: push-image - uses: redhat-actions/push-to-registry@v2 - with: - image: ${{ steps.build-image.outputs.image }} - tags: ${{ steps.build-image.outputs.tags }} - registry: ${{ env.IMAGE_REGISTRY }} - username: ${{ env.IMAGE_REGISTRY_USER }} - password: ${{ env.IMAGE_REGISTRY_PASSWORD }} \ No newline at end of file + - name: Checkout repository + uses: actions/checkout@v4 + # Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. + - name: Log in to the Container registry + uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + # This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels. + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + # This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages. + # It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository. + # It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. + - name: Build and push Docker image + id: push + uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 + with: + file: ./openshift/openshift.dockerfile + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + +# # This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)." +# * name: Generate artifact attestation +# uses: actions/attest-build-provenance@v1 +# with: +# subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} +# subject-digest: ${{ steps.push.outputs.digest }} +# push-to-registry: true +# From 5dd0545e339eb222d0414e23725e43c0b2ea8e17 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 16:27:53 +0200 Subject: [PATCH 43/69] Over een andere boeg 2 --- .github/workflows/docker-image-Laravel.yml | 2 ++ openshift/openshift.dockerfile | 10 +++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 768b521..1291841 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -53,6 +53,8 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + secrets: | + GIT_AUTH_TOKEN=${{ secrets.COMPOSER_AUTH }} # # This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)." # * name: Generate artifact attestation diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index b0716d6..a6c9ec3 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -36,22 +36,18 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json -RUN echo "$IMAGE" -RUN echo "$ENVS" -RUN echo "$ENV" -RUN echo "$COMPOSER_AUTH" -RUN echo "$composer_auth" +RUN echo $COMPOSER_AUTH # RUN #composer diagnose #RUN echo ${COMPOSER_AUTH_JSON} -RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer +# curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer RUN composer diagnose # run composer # run composer -RUN composer config --global --auth github-oauth.github.com "$COMPOSER_AUTH" +RUN composer config --global --auth github-oauth.github.com $COMPOSER_AUTH RUN composer diagnose From a1d29412cfb2abcbd0fa35d1f85bfaa1230c4356 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 16:29:36 +0200 Subject: [PATCH 44/69] Over een andere boeg 3 --- openshift/openshift.dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index a6c9ec3..4fd3353 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -37,17 +37,17 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json -RUN echo $COMPOSER_AUTH +RUN echo $GIT_AUTH_TOKEN # RUN #composer diagnose #RUN echo ${COMPOSER_AUTH_JSON} -# curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer +curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer RUN composer diagnose # run composer # run composer -RUN composer config --global --auth github-oauth.github.com $COMPOSER_AUTH +RUN composer config --global --auth github-oauth.github.com $GIT_AUTH_TOKEN RUN composer diagnose From 7b24c9b5119af5d8110a0ace1c4dfdc5def405cd Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 16:30:39 +0200 Subject: [PATCH 45/69] Over een andere boeg 3 --- openshift/openshift.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 4fd3353..af84b10 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -41,7 +41,7 @@ RUN echo $GIT_AUTH_TOKEN # RUN #composer diagnose #RUN echo ${COMPOSER_AUTH_JSON} -curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer +RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer RUN composer diagnose # run composer From 23b2aa2db69fc6a320bc42e2f10cc34ec7230d0e Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 16:36:52 +0200 Subject: [PATCH 46/69] Over een andere boeg 3 --- openshift/openshift.dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index af84b10..a6deb05 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -37,21 +37,21 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json -RUN echo $GIT_AUTH_TOKEN +RUN echo ${GIT_AUTH_TOKEN} # RUN #composer diagnose #RUN echo ${COMPOSER_AUTH_JSON} RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer -RUN composer diagnose +RUN sudo -u www-data composer diagnose # run composer # run composer -RUN composer config --global --auth github-oauth.github.com $GIT_AUTH_TOKEN +RUN sudo -u www-data composer config --global --auth github-oauth.github.com ${GIT_AUTH_TOKEN} -RUN composer diagnose +RUN sudo -u www-data composer diagnose -RUN composer install --prefer-dist --no-suggest --no-progress --no-interaction +RUN sudo -u www-data composer install --prefer-dist --no-suggest --no-progress --no-interaction #RUN composer install --prefer-dist --no-suggest --no-progress COPY ./openshift/openshift.env /var/www/.env From 89e45dc64ed9237dcf9ed3daa593297989f26467 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 16:39:23 +0200 Subject: [PATCH 47/69] Over een andere boeg 3 --- openshift/openshift.dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index a6deb05..809e5f4 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -36,22 +36,21 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json - -RUN echo ${GIT_AUTH_TOKEN} +RUN echo ${secret.GIT_AUTH_TOKEN} # RUN #composer diagnose #RUN echo ${COMPOSER_AUTH_JSON} RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer -RUN sudo -u www-data composer diagnose +RUN composer diagnose # run composer # run composer -RUN sudo -u www-data composer config --global --auth github-oauth.github.com ${GIT_AUTH_TOKEN} +RUN composer config --global --auth github-oauth.github.com ${secret.GIT_AUTH_TOKEN} -RUN sudo -u www-data composer diagnose +RUN composer diagnose -RUN sudo -u www-data composer install --prefer-dist --no-suggest --no-progress --no-interaction +RUN composer install --prefer-dist --no-suggest --no-progress --no-interaction #RUN composer install --prefer-dist --no-suggest --no-progress COPY ./openshift/openshift.env /var/www/.env From 890597d8a0f09993e93d3e810e280f324895d703 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 17:02:34 +0200 Subject: [PATCH 48/69] Over een andere boeg 3 --- openshift/openshift.dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 809e5f4..34907d2 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -13,7 +13,7 @@ RUN apt-get -qq install -y sudo nano RUN apt-get -qq install -y mariadb-client RUN apt-get -qq install -y libonig-dev -RUN apt-get -qq install -y curl gnupg git +RUN apt-get -qq install -y gnupg git # install mysql RUN docker-php-ext-install pdo_mysql mysqli @@ -36,11 +36,11 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json -RUN echo ${secret.GIT_AUTH_TOKEN} +RUN ${which sh} # RUN #composer diagnose #RUN echo ${COMPOSER_AUTH_JSON} -RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer +COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer RUN composer diagnose # run composer From 04b415ca1fc2c64f43fa969533293ec6ac877847 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 17:06:51 +0200 Subject: [PATCH 49/69] Over een andere boeg 3 --- openshift/openshift.dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 34907d2..4213266 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -36,7 +36,6 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json -RUN ${which sh} # RUN #composer diagnose #RUN echo ${COMPOSER_AUTH_JSON} From d985a44ad8b3f8c1c5a0ef7f5db026054e1b0fd4 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 17:10:00 +0200 Subject: [PATCH 50/69] Over een andere boeg 3 --- .github/workflows/docker-image-Laravel.yml | 2 ++ openshift/openshift.dockerfile | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 1291841..3443990 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -53,6 +53,8 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + argument: | + COMPOSER_AUTH=${{ secrets.COMPOSER_AUTH }} secrets: | GIT_AUTH_TOKEN=${{ secrets.COMPOSER_AUTH }} diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 4213266..e985e34 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -37,6 +37,8 @@ COPY .. /var/www # install & run composer #COPY ./docker/auth.json /root/.composer/auth.json +ARG COMPOSER_AUTH='"TempToken"' +ENV GIT_AUTH_TOKEN=${COMPOSER_AUTH} # RUN #composer diagnose #RUN echo ${COMPOSER_AUTH_JSON} COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer @@ -45,7 +47,7 @@ RUN composer diagnose # run composer # run composer -RUN composer config --global --auth github-oauth.github.com ${secret.GIT_AUTH_TOKEN} +RUN composer config --global --auth github-oauth.github.com $GIT_AUTH_TOKEN RUN composer diagnose From fe790f8477e609c0b6f376cbe5dcfd86202ee07a Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 17:17:32 +0200 Subject: [PATCH 51/69] Over een andere boeg 5 --- .github/workflows/docker-image-Laravel.yml | 13 ++++++++----- openshift/openshift.dockerfile | 22 +--------------------- 2 files changed, 9 insertions(+), 26 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 3443990..2c86bf8 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -28,6 +28,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.2 # Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. - name: Log in to the Container registry uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 @@ -44,6 +48,10 @@ jobs: # This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages. # It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository. # It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. + - name: Install dependencies + env: + COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{secrets.COMPOSER_AUTH}}"} }' # [tl! **] + run: composer update && composer install --prefer-dist --no-suggest --no-progress - name: Build and push Docker image id: push uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 @@ -53,11 +61,6 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - argument: | - COMPOSER_AUTH=${{ secrets.COMPOSER_AUTH }} - secrets: | - GIT_AUTH_TOKEN=${{ secrets.COMPOSER_AUTH }} - # # This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)." # * name: Generate artifact attestation # uses: actions/attest-build-provenance@v1 diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index e985e34..f75c6ab 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -13,7 +13,7 @@ RUN apt-get -qq install -y sudo nano RUN apt-get -qq install -y mariadb-client RUN apt-get -qq install -y libonig-dev -RUN apt-get -qq install -y gnupg git +RUN apt-get -qq install -y curl gnupg git # install mysql RUN docker-php-ext-install pdo_mysql mysqli @@ -34,26 +34,6 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone # copy webapp files COPY .. /var/www -# install & run composer -#COPY ./docker/auth.json /root/.composer/auth.json - -ARG COMPOSER_AUTH='"TempToken"' -ENV GIT_AUTH_TOKEN=${COMPOSER_AUTH} -# RUN #composer diagnose -#RUN echo ${COMPOSER_AUTH_JSON} -COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer - -RUN composer diagnose -# run composer - -# run composer -RUN composer config --global --auth github-oauth.github.com $GIT_AUTH_TOKEN - -RUN composer diagnose - -RUN composer install --prefer-dist --no-suggest --no-progress --no-interaction -#RUN composer install --prefer-dist --no-suggest --no-progress - COPY ./openshift/openshift.env /var/www/.env RUN chmod -R a+rw /var/www/storage From 5b750e758d5046b175508c91a36ae18067e40e9c Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 17:30:29 +0200 Subject: [PATCH 52/69] Over een andere boeg 5 --- .github/workflows/docker-image-Laravel.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 2c86bf8..da79a7a 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -13,6 +13,7 @@ on: env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} + TAG_NAME: ${{ github.repository }} # There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. jobs: @@ -40,11 +41,14 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} # This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels. - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + - name: Docker meta + id: docker_meta + uses: crazy-max/ghaction-docker-meta@v1 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tag-custom: latest + tag-semver: | + {{raw}} # This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages. # It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository. # It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. @@ -59,8 +63,8 @@ jobs: file: ./openshift/openshift.dockerfile context: . push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + tags: ${{ steps.docker_meta.outputs.tags }} + labels: ${{ steps.docker_meta.outputs.labels }} # # This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)." # * name: Generate artifact attestation # uses: actions/attest-build-provenance@v1 From a991952efa2da30080706fd05812045b678e1067 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 17:37:45 +0200 Subject: [PATCH 53/69] Over een andere boeg 5 --- .github/workflows/docker-image-Laravel.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index da79a7a..19c78d9 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -1,4 +1,3 @@ -# name: Create and publish a Docker image # Configures this workflow to run every time a change is pushed to the branch called `release`. @@ -7,7 +6,7 @@ on: branches: [ "master", "develop"] pull_request: branches: [ "master", "develop", "feature/**"] - types: ["assigned", "opened", "synchronize", "reopened", "edited"] + types: ["opened", "synchronize"] # Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. env: @@ -41,14 +40,11 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} # This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels. - - name: Docker meta - id: docker_meta - uses: crazy-max/ghaction-docker-meta@v1 + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - tag-custom: latest - tag-semver: | - {{raw}} # This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages. # It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository. # It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. @@ -63,8 +59,8 @@ jobs: file: ./openshift/openshift.dockerfile context: . push: true - tags: ${{ steps.docker_meta.outputs.tags }} - labels: ${{ steps.docker_meta.outputs.labels }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} # # This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)." # * name: Generate artifact attestation # uses: actions/attest-build-provenance@v1 From 56b29937ce63e6474ec3cbdea818571ee2adce7a Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 17:41:18 +0200 Subject: [PATCH 54/69] Over een andere boeg 5 --- storage/logs/laravel.log | 76 ---------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 storage/logs/laravel.log diff --git a/storage/logs/laravel.log b/storage/logs/laravel.log deleted file mode 100644 index 3a36c36..0000000 --- a/storage/logs/laravel.log +++ /dev/null @@ -1,76 +0,0 @@ -[2024-07-01 11:33:02] local.ERROR: SQLSTATE[HY000] [2002] Connection refused (Connection: mysql, SQL: select table_name as `name`, (data_length + index_length) as `size`, table_comment as `comment`, engine as `engine`, table_collation as `collation` from information_schema.tables where table_schema = 'development' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED') order by table_name) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 2002): SQLSTATE[HY000] [2002] Connection refused (Connection: mysql, SQL: select table_name as `name`, (data_length + index_length) as `size`, table_comment as `comment`, engine as `engine`, table_collation as `collation` from information_schema.tables where table_schema = 'development' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED') order by table_name) at /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:829) -[stacktrace] -#0 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(983): Illuminate\\Database\\Connection->runQueryCallback('select table_na...', Array, Object(Closure)) -#1 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(962): Illuminate\\Database\\Connection->tryAgainIfCausedByLostConnection(Object(Illuminate\\Database\\QueryException), 'select table_na...', Array, Object(Closure)) -#2 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(785): Illuminate\\Database\\Connection->handleQueryException(Object(Illuminate\\Database\\QueryException), 'select table_na...', Array, Object(Closure)) -#3 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(414): Illuminate\\Database\\Connection->run('select table_na...', Array, Object(Closure)) -#4 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(401): Illuminate\\Database\\Connection->select('select table_na...', Array, false) -#5 /var/www/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php(41): Illuminate\\Database\\Connection->selectFromWriteConnection('select table_na...') -#6 /var/www/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(165): Illuminate\\Database\\Schema\\MySqlBuilder->getTables(false) -#7 /var/www/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php(184): Illuminate\\Database\\Schema\\Builder->hasTable('migrations') -#8 /var/www/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(700): Illuminate\\Database\\Migrations\\DatabaseMigrationRepository->repositoryExists() -#9 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(140): Illuminate\\Database\\Migrations\\Migrator->repositoryExists() -#10 /var/www/vendor/laravel/framework/src/Illuminate/Support/helpers.php(248): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->Illuminate\\Database\\Console\\Migrations\\{closure}(1) -#11 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(140): retry(1, Object(Closure), 0, Object(Closure)) -#12 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(116): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->repositoryExists() -#13 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(84): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->prepareDatabase() -#14 /var/www/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(633): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->Illuminate\\Database\\Console\\Migrations\\{closure}() -#15 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(83): Illuminate\\Database\\Migrations\\Migrator->usingConnection(NULL, Object(Closure)) -#16 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->handle() -#17 /var/www/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}() -#18 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure)) -#19 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure)) -#20 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL) -#21 /var/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\\Container\\Container->call(Array) -#22 /var/www/vendor/symfony/console/Command/Command.php(326): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle)) -#23 /var/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle)) -#24 /var/www/vendor/symfony/console/Application.php(1096): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) -#25 /var/www/vendor/symfony/console/Application.php(324): Symfony\\Component\\Console\\Application->doRunCommand(Object(Illuminate\\Database\\Console\\Migrations\\MigrateCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) -#26 /var/www/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) -#27 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) -#28 /var/www/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) -#29 {main} - -[previous exception] [object] (PDOException(code: 2002): SQLSTATE[HY000] [2002] Connection refused at /var/www/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:65) -[stacktrace] -#0 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(65): PDO->__construct('mysql:host=mari...', 'development', Object(SensitiveParameterValue), Array) -#1 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(83): Illuminate\\Database\\Connectors\\Connector->createPdoConnection('mysql:host=mari...', 'development', 'secret', Array) -#2 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(48): Illuminate\\Database\\Connectors\\Connector->tryAgainIfCausedByLostConnection(Object(PDOException), 'mysql:host=mari...', 'development', 'secret', Array) -#3 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\\Database\\Connectors\\Connector->createConnection('mysql:host=mari...', Array, Array) -#4 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(184): Illuminate\\Database\\Connectors\\MySqlConnector->connect(Array) -#5 [internal function]: Illuminate\\Database\\Connectors\\ConnectionFactory->Illuminate\\Database\\Connectors\\{closure}() -#6 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(1339): call_user_func(Object(Closure)) -#7 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(528): Illuminate\\Database\\Connection->getPdo() -#8 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(423): Illuminate\\Database\\Connection->getPdoForSelect(false) -#9 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(816): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}('select table_na...', Array) -#10 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(983): Illuminate\\Database\\Connection->runQueryCallback('select table_na...', Array, Object(Closure)) -#11 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(962): Illuminate\\Database\\Connection->tryAgainIfCausedByLostConnection(Object(Illuminate\\Database\\QueryException), 'select table_na...', Array, Object(Closure)) -#12 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(785): Illuminate\\Database\\Connection->handleQueryException(Object(Illuminate\\Database\\QueryException), 'select table_na...', Array, Object(Closure)) -#13 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(414): Illuminate\\Database\\Connection->run('select table_na...', Array, Object(Closure)) -#14 /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(401): Illuminate\\Database\\Connection->select('select table_na...', Array, false) -#15 /var/www/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php(41): Illuminate\\Database\\Connection->selectFromWriteConnection('select table_na...') -#16 /var/www/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(165): Illuminate\\Database\\Schema\\MySqlBuilder->getTables(false) -#17 /var/www/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php(184): Illuminate\\Database\\Schema\\Builder->hasTable('migrations') -#18 /var/www/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(700): Illuminate\\Database\\Migrations\\DatabaseMigrationRepository->repositoryExists() -#19 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(140): Illuminate\\Database\\Migrations\\Migrator->repositoryExists() -#20 /var/www/vendor/laravel/framework/src/Illuminate/Support/helpers.php(248): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->Illuminate\\Database\\Console\\Migrations\\{closure}(1) -#21 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(140): retry(1, Object(Closure), 0, Object(Closure)) -#22 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(116): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->repositoryExists() -#23 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(84): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->prepareDatabase() -#24 /var/www/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(633): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->Illuminate\\Database\\Console\\Migrations\\{closure}() -#25 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(83): Illuminate\\Database\\Migrations\\Migrator->usingConnection(NULL, Object(Closure)) -#26 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Database\\Console\\Migrations\\MigrateCommand->handle() -#27 /var/www/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}() -#28 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure)) -#29 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure)) -#30 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL) -#31 /var/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\\Container\\Container->call(Array) -#32 /var/www/vendor/symfony/console/Command/Command.php(326): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle)) -#33 /var/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle)) -#34 /var/www/vendor/symfony/console/Application.php(1096): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) -#35 /var/www/vendor/symfony/console/Application.php(324): Symfony\\Component\\Console\\Application->doRunCommand(Object(Illuminate\\Database\\Console\\Migrations\\MigrateCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) -#36 /var/www/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) -#37 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) -#38 /var/www/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) -#39 {main} -"} From 7b46c92eb3824befa2f469d01fe8b5546911a2bb Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 2 Jul 2024 10:25:49 +0200 Subject: [PATCH 55/69] Added frontend container --- .github/workflows/docker-image-Frontend.yml | 71 +++++++++++++++++++ .github/workflows/docker-image-Nginx.yml | 1 + docker/frontend.dockerfile | 2 + openshift/config/06_sample-app.yaml | 53 -------------- ...{07_sample-svc.yaml => 08_sample-svc.yaml} | 0 ...le-app-cm.yaml => 09_sample-front-cm.yaml} | 4 +- openshift/config/10_sample-front.yaml | 33 +++++++++ openshift/config/11_sample-front-svc.yaml | 13 ++++ .../config/{08_nginx.yaml => 12_nginx.yaml} | 0 .../{09_nginx-svc.yaml => 13_nginx-svc.yaml} | 0 ...le-ingress.yaml => 14_sample-ingress.yaml} | 0 openshift/frontend-entrypoint.sh | 4 ++ openshift/frontend.dockerfile | 18 +++++ resources/css/app.css | 0 resources/sass/app.scss | 1 + resources/views/layouts/app.blade.php | 3 +- 16 files changed, 148 insertions(+), 55 deletions(-) create mode 100644 .github/workflows/docker-image-Frontend.yml delete mode 100644 openshift/config/06_sample-app.yaml rename openshift/config/{07_sample-svc.yaml => 08_sample-svc.yaml} (100%) rename openshift/config/{05_sample-app-cm.yaml => 09_sample-front-cm.yaml} (51%) create mode 100644 openshift/config/10_sample-front.yaml create mode 100644 openshift/config/11_sample-front-svc.yaml rename openshift/config/{08_nginx.yaml => 12_nginx.yaml} (100%) rename openshift/config/{09_nginx-svc.yaml => 13_nginx-svc.yaml} (100%) rename openshift/config/{10_sample-ingress.yaml => 14_sample-ingress.yaml} (100%) create mode 100644 openshift/frontend-entrypoint.sh create mode 100644 openshift/frontend.dockerfile delete mode 100644 resources/css/app.css create mode 100644 resources/sass/app.scss diff --git a/.github/workflows/docker-image-Frontend.yml b/.github/workflows/docker-image-Frontend.yml new file mode 100644 index 0000000..c84994a --- /dev/null +++ b/.github/workflows/docker-image-Frontend.yml @@ -0,0 +1,71 @@ +name: Create and publish a Docker image + +# Configures this workflow to run every time a change is pushed to the branch called `release`. +on: + push: + branches: [ "master", "develop"] + pull_request: + branches: [ "master", "develop", "feature/**"] + types: ["opened", "synchronize"] + +# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }}-Frontend + TAG_NAME: ${{ github.repository }} + +# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. +jobs: + build-and-push-image: + runs-on: ubuntu-latest + # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. + permissions: + contents: read + packages: write + attestations: write + id-token: write + # + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.2 + # Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. + - name: Log in to the Container registry + uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + # This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels. + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + # This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages. + # It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository. + # It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. + - name: Install dependencies + env: + COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{secrets.COMPOSER_AUTH}}"} }' # [tl! **] + run: composer update && composer install --prefer-dist --no-suggest --no-progress + - name: Build and push Docker image + id: push + uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 + with: + file: ./openshift/openshift.dockerfile + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} +# # This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)." +# * name: Generate artifact attestation +# uses: actions/attest-build-provenance@v1 +# with: +# subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} +# subject-digest: ${{ steps.push.outputs.digest }} +# push-to-registry: true +# diff --git a/.github/workflows/docker-image-Nginx.yml b/.github/workflows/docker-image-Nginx.yml index 8078c8f..ebc4694 100644 --- a/.github/workflows/docker-image-Nginx.yml +++ b/.github/workflows/docker-image-Nginx.yml @@ -5,6 +5,7 @@ env: IMAGE_REGISTRY: ghcr.io/utrechtuniversity IMAGE_REGISTRY_USER: ${{ github.actor }} IMAGE_REGISTRY_PASSWORD: ${{ github.token }} + TAG_NAME: ${{ github.repository }} on: push: branches: [ "master", "develop"] diff --git a/docker/frontend.dockerfile b/docker/frontend.dockerfile index 308201d..770cdf7 100644 --- a/docker/frontend.dockerfile +++ b/docker/frontend.dockerfile @@ -3,6 +3,8 @@ FROM node:20-alpine RUN mkdir -p /var/www/ WORKDIR /var/www +RUN apk add --no-cache git + # copy webapp files COPY .. /var/www RUN npm install diff --git a/openshift/config/06_sample-app.yaml b/openshift/config/06_sample-app.yaml deleted file mode 100644 index 752ede0..0000000 --- a/openshift/config/06_sample-app.yaml +++ /dev/null @@ -1,53 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: fsw-sample-app - labels: - app: fsw-sample-app - app.kubernetes.io/part-of: fsw-sample-app -spec: - replicas: 1 - selector: - matchLabels: - app: sample-app - template: - metadata: - labels: - app: sample-app - spec: - containers: - - name: sample-app - image: ghcr.io/utrechtuniversity/fsw-openshift:latest - ports: - - containerPort: 9000 - env: - - name: LARAVEL_DATABASE_TYPE - valueFrom: - configMapKeyRef: - name: sample-config - key: database-type - - name: LARAVEL_DATABASE_HOST - valueFrom: - configMapKeyRef: - name: sample-config - key: database-host - - name: LARAVEL_DATABASE_PORT_NUMBER - valueFrom: - configMapKeyRef: - name: sample-config - key: database-port-number - - name: LARAVEL_DATABASE_NAME - valueFrom: - configMapKeyRef: - name: sample-config - key: database-name - - name: LARAVEL_DATABASE_USER - valueFrom: - configMapKeyRef: - name: mariadb-config - key: mariadb-user - - name: LARAVEL_DATABASE_PASSWORD - valueFrom: - secretKeyRef: - name: mariadb-secret - key: mariadb-password diff --git a/openshift/config/07_sample-svc.yaml b/openshift/config/08_sample-svc.yaml similarity index 100% rename from openshift/config/07_sample-svc.yaml rename to openshift/config/08_sample-svc.yaml diff --git a/openshift/config/05_sample-app-cm.yaml b/openshift/config/09_sample-front-cm.yaml similarity index 51% rename from openshift/config/05_sample-app-cm.yaml rename to openshift/config/09_sample-front-cm.yaml index 7356fb7..0c6b9e5 100644 --- a/openshift/config/05_sample-app-cm.yaml +++ b/openshift/config/09_sample-front-cm.yaml @@ -7,4 +7,6 @@ data: database-type: mysql database-host: mariadb-sample database-port-number: '3306' - database-name: sample-database \ No newline at end of file + database-name: sample-database + oidc-provider-url: https://login.acc.uu.nl/nidp/oauth/nam + oidc-slo-link: https://login.acc.uu.nl/nidp/app/logout \ No newline at end of file diff --git a/openshift/config/10_sample-front.yaml b/openshift/config/10_sample-front.yaml new file mode 100644 index 0000000..9e85e3d --- /dev/null +++ b/openshift/config/10_sample-front.yaml @@ -0,0 +1,33 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: fsw-sample-app + labels: + app: fsw-sample-app + app.kubernetes.io/part-of: fsw-sample-app +spec: + replicas: 1 + selector: + matchLabels: + app: sample-front + template: + metadata: + labels: + app: sample-front + spec: + containers: + - name: sample-app + image: ghcr.io/utrechtuniversity/fsw-openshift:develop + ports: + - containerPort: 7050 + env: + - name: LARAVEL_DATABASE_TYPE + valueFrom: + configMapKeyRef: + name: sample-config + key: database-type + - name: LARAVEL_DATABASE_HOST + valueFrom: + configMapKeyRef: + name: sample-config + key: database-host diff --git a/openshift/config/11_sample-front-svc.yaml b/openshift/config/11_sample-front-svc.yaml new file mode 100644 index 0000000..e9e14ae --- /dev/null +++ b/openshift/config/11_sample-front-svc.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: sample-front + labels: + app: fsw-sample-app + app.kubernetes.io/part-of: fsw-sample-app +spec: + ports: + - port: 7050 + targetPort: 7050 + selector: + app: sample-front diff --git a/openshift/config/08_nginx.yaml b/openshift/config/12_nginx.yaml similarity index 100% rename from openshift/config/08_nginx.yaml rename to openshift/config/12_nginx.yaml diff --git a/openshift/config/09_nginx-svc.yaml b/openshift/config/13_nginx-svc.yaml similarity index 100% rename from openshift/config/09_nginx-svc.yaml rename to openshift/config/13_nginx-svc.yaml diff --git a/openshift/config/10_sample-ingress.yaml b/openshift/config/14_sample-ingress.yaml similarity index 100% rename from openshift/config/10_sample-ingress.yaml rename to openshift/config/14_sample-ingress.yaml diff --git a/openshift/frontend-entrypoint.sh b/openshift/frontend-entrypoint.sh new file mode 100644 index 0000000..a1231a5 --- /dev/null +++ b/openshift/frontend-entrypoint.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env sh + +echo "⭐️ Start dev server" +npm run dev diff --git a/openshift/frontend.dockerfile b/openshift/frontend.dockerfile new file mode 100644 index 0000000..770cdf7 --- /dev/null +++ b/openshift/frontend.dockerfile @@ -0,0 +1,18 @@ +FROM node:20-alpine +# set workdir +RUN mkdir -p /var/www/ +WORKDIR /var/www + +RUN apk add --no-cache git + +# copy webapp files +COPY .. /var/www +RUN npm install +RUN npm run build + +# entrypoint +COPY ./docker/frontend-entrypoint.sh /entrypoint.sh +RUN chmod ugo+x /entrypoint.sh +RUN dos2unix /entrypoint.sh + +ENTRYPOINT /entrypoint.sh diff --git a/resources/css/app.css b/resources/css/app.css deleted file mode 100644 index e69de29..0000000 diff --git a/resources/sass/app.scss b/resources/sass/app.scss new file mode 100644 index 0000000..93c4b1c --- /dev/null +++ b/resources/sass/app.scss @@ -0,0 +1 @@ +@import "~bootstrap/scss/bootstrap"; \ No newline at end of file diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 08e3138..fa835f1 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -28,7 +28,8 @@ - @vite(['resources/sass/app.scss', 'resources/js/app.js', 'resources/js/hts-appteam-livewire/appteam-livewire.js']) + @vite(['resources/sass/app.scss', 'resources/js/app.js']) + From de4aaeff219976e4032b13a6319afcd0dc590684 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 2 Jul 2024 10:26:31 +0200 Subject: [PATCH 56/69] vite config. --- README.md | 2 + package-lock.json | 454 ++++++++++++++++++++++++++++++++++++++++------ package.json | 7 + vite.config.js | 31 +++- 4 files changed, 440 insertions(+), 54 deletions(-) diff --git a/README.md b/README.md index d442926..d5ddf6e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ https://www.redhat.com/sysadmin/codeready-containers Soms wil hij niet starten, dan moet je de vm verwijderen en opnieuw starten: `crc cleanup` +https://console-openshift-console.apps-crc.testing/ +oc login -u developer -p developer https://api.crc.testing:6443 ### Local development: Add the following to your /etc/hosts file: diff --git a/package-lock.json b/package-lock.json index 92ce127..b5b51e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,9 +4,16 @@ "requires": true, "packages": { "": { + "dependencies": { + "circle-flags": "git+https://github.com/HatScripts/circle-flags.git", + "dotenv": "^16.4.5", + "vite-plugin-static-copy": "^0.17.0" + }, "devDependencies": { "axios": "^1.6.4", + "bootstrap": "^5.3.2", "laravel-vite-plugin": "^1.0.0", + "sass": "^1.77.5", "vite": "^5.0.0" } }, @@ -17,7 +24,6 @@ "cpu": [ "ppc64" ], - "dev": true, "optional": true, "os": [ "aix" @@ -33,7 +39,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "android" @@ -49,7 +54,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "android" @@ -65,7 +69,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "android" @@ -81,7 +84,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -97,7 +99,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -113,7 +114,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "freebsd" @@ -129,7 +129,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "freebsd" @@ -145,7 +144,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "linux" @@ -161,7 +159,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -177,7 +174,6 @@ "cpu": [ "ia32" ], - "dev": true, "optional": true, "os": [ "linux" @@ -193,7 +189,6 @@ "cpu": [ "loong64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -209,7 +204,6 @@ "cpu": [ "mips64el" ], - "dev": true, "optional": true, "os": [ "linux" @@ -225,7 +219,6 @@ "cpu": [ "ppc64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -241,7 +234,6 @@ "cpu": [ "riscv64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -257,7 +249,6 @@ "cpu": [ "s390x" ], - "dev": true, "optional": true, "os": [ "linux" @@ -273,7 +264,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -289,7 +279,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "netbsd" @@ -305,7 +294,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "openbsd" @@ -321,7 +309,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "sunos" @@ -337,7 +324,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -353,7 +339,6 @@ "cpu": [ "ia32" ], - "dev": true, "optional": true, "os": [ "win32" @@ -369,7 +354,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -378,6 +362,49 @@ "node": ">=12" } }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "dev": true, + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.17.2", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.17.2.tgz", @@ -385,7 +412,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "android" @@ -398,7 +424,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "android" @@ -411,7 +436,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -424,7 +448,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -437,7 +460,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "linux" @@ -450,7 +472,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "linux" @@ -463,7 +484,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -476,7 +496,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -489,7 +508,6 @@ "cpu": [ "ppc64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -502,7 +520,6 @@ "cpu": [ "riscv64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -515,7 +532,6 @@ "cpu": [ "s390x" ], - "dev": true, "optional": true, "os": [ "linux" @@ -528,7 +544,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -541,7 +556,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -554,7 +568,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -567,7 +580,6 @@ "cpu": [ "ia32" ], - "dev": true, "optional": true, "os": [ "win32" @@ -580,7 +592,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -589,8 +600,19 @@ "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", - "dev": true + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } }, "node_modules/asynckit": { "version": "0.4.0", @@ -609,6 +631,74 @@ "proxy-from-env": "^1.1.0" } }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bootstrap": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.3.tgz", + "integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/twbs" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + } + ], + "peerDependencies": { + "@popperjs/core": "^2.11.8" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/circle-flags": { + "version": "1.0.0", + "resolved": "git+ssh://git@github.com/HatScripts/circle-flags.git#6452fa836a38e8e46b0d1833d3e83dbcef194d6b" + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -630,11 +720,21 @@ "node": ">=0.4.0" } }, + "node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/esbuild": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", - "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" @@ -668,6 +768,40 @@ "@esbuild/win32-x64": "0.20.2" } }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/follow-redirects": { "version": "1.15.6", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", @@ -702,11 +836,23 @@ "node": ">= 6" } }, + "node_modules/fs-extra": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, "hasInstallScript": true, "optional": true, "os": [ @@ -716,6 +862,77 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "node_modules/immutable": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.6.tgz", + "integrity": "sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==", + "devOptional": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/laravel-vite-plugin": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/laravel-vite-plugin/-/laravel-vite-plugin-1.0.2.tgz", @@ -735,6 +952,26 @@ "vite": "^5.0.0" } }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -760,7 +997,6 @@ "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", - "dev": true, "funding": [ { "type": "github", @@ -774,17 +1010,23 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, "engines": { "node": ">=8.6" }, @@ -796,7 +1038,6 @@ "version": "8.4.38", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", - "dev": true, "funding": [ { "type": "opencollective", @@ -826,11 +1067,49 @@ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "dev": true }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/rollup": { "version": "4.17.2", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.17.2.tgz", "integrity": "sha512-/9ClTJPByC0U4zNLowV1tMBe8yMEAxewtR3cUNX5BoEpGH3dQEWpJLr6CLp0fPdYRF/fzVOgvDb1zXuakwF5kQ==", - "dev": true, "dependencies": { "@types/estree": "1.0.5" }, @@ -861,20 +1140,76 @@ "fsevents": "~2.3.2" } }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/sass": { + "version": "1.77.6", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.6.tgz", + "integrity": "sha512-ByXE1oLD79GVq9Ht1PeHWCPMPB8XHpBuz1r85oByKHjZY6qV6rWnQovQzXJXuQ/XyE1Oj3iPk3lo28uzaRA2/Q==", + "devOptional": true, + "dependencies": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/source-map-js": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", - "dev": true, "engines": { "node": ">=0.10.0" } }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/vite": { "version": "5.2.11", "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.11.tgz", "integrity": "sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==", - "dev": true, "dependencies": { "esbuild": "^0.20.1", "postcss": "^8.4.38", @@ -934,6 +1269,23 @@ "picocolors": "^1.0.0", "picomatch": "^2.3.1" } + }, + "node_modules/vite-plugin-static-copy": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/vite-plugin-static-copy/-/vite-plugin-static-copy-0.17.1.tgz", + "integrity": "sha512-9h3iaVs0bqnqZOM5YHJXGHqdC5VAVlTZ2ARYsuNpzhEJUHmFqXY7dAK4ZFpjEQ4WLFKcaN8yWbczr81n01U4sQ==", + "dependencies": { + "chokidar": "^3.5.3", + "fast-glob": "^3.2.11", + "fs-extra": "^11.1.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0" + } } } } diff --git a/package.json b/package.json index 56f5ddc..cbd6923 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,13 @@ "devDependencies": { "axios": "^1.6.4", "laravel-vite-plugin": "^1.0.0", + "bootstrap": "^5.3.2", + "sass": "^1.77.5", "vite": "^5.0.0" + }, + "dependencies": { + "dotenv": "^16.4.5", + "circle-flags": "git+https://github.com/HatScripts/circle-flags.git", + "vite-plugin-static-copy": "^0.17.0" } } diff --git a/vite.config.js b/vite.config.js index 35aa8b1..b384791 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,23 +1,48 @@ import { defineConfig } from 'vite'; import fs from 'fs'; import laravel from 'laravel-vite-plugin'; +import dotenv from 'dotenv'; +import path from 'path'; +import {viteStaticCopy} from "vite-plugin-static-copy"; + +dotenv.config() // load env vars from .env + +const host = `${process.env.VITE_API_URL ?? 'http://localhost:3000'}`; +const port = `${process.env.VITE_PORT ?? '3000'}`; +console.log(`Vite server running on ${host}:${port}`); export default defineConfig({ plugins: [ laravel({ - input: ['resources/css/app.css', 'resources/js/app.js'], + input: [ + 'resources/sass/app.scss', + 'resources/js/app.js' + ], refresh: true, }), + viteStaticCopy({ + targets: [ + { + src: 'node_modules/circle-flags/flags/', + dest: 'images' + } + ] + }) ], + resolve: { + alias: { + '~bootstrap': path.resolve(__dirname, 'node_modules/bootstrap'), + } + }, server: { https: { key: fs.readFileSync('docker/certificates/docker.dev.key'), cert: fs.readFileSync('docker/certificates/docker.dev.crt'), }, host: true, - port: 7050, + port: `${port}`, hmr: { - host: 'openshift.docker.dev', + host: `${host}`, protocol: 'wss' }, }, From 64fcc314d6044724ff297cfede5b2cb0daacfe63 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 2 Jul 2024 10:28:36 +0200 Subject: [PATCH 57/69] sample config. --- openshift/config/05_sample-app-secret.yaml | 11 +++++ openshift/config/06_sample-app-cm.yaml | 10 ++++ openshift/config/07_sample-app.yaml | 53 ++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 openshift/config/05_sample-app-secret.yaml create mode 100644 openshift/config/06_sample-app-cm.yaml create mode 100644 openshift/config/07_sample-app.yaml diff --git a/openshift/config/05_sample-app-secret.yaml b/openshift/config/05_sample-app-secret.yaml new file mode 100644 index 0000000..4428e4e --- /dev/null +++ b/openshift/config/05_sample-app-secret.yaml @@ -0,0 +1,11 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + name: sample-app-secret +type: Opaque +data: + # Use the following command to generate a random password: + # echo -n 'ChangeThisSuperSecretPassword' | base64 + oidc-client-id: + oidc-client-secret: \ No newline at end of file diff --git a/openshift/config/06_sample-app-cm.yaml b/openshift/config/06_sample-app-cm.yaml new file mode 100644 index 0000000..7356fb7 --- /dev/null +++ b/openshift/config/06_sample-app-cm.yaml @@ -0,0 +1,10 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: sample-config +data: + database-type: mysql + database-host: mariadb-sample + database-port-number: '3306' + database-name: sample-database \ No newline at end of file diff --git a/openshift/config/07_sample-app.yaml b/openshift/config/07_sample-app.yaml new file mode 100644 index 0000000..c5fa85b --- /dev/null +++ b/openshift/config/07_sample-app.yaml @@ -0,0 +1,53 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: fsw-sample-app + labels: + app: fsw-sample-app + app.kubernetes.io/part-of: fsw-sample-app +spec: + replicas: 1 + selector: + matchLabels: + app: sample-app + template: + metadata: + labels: + app: sample-app + spec: + containers: + - name: sample-app + image: ghcr.io/utrechtuniversity/fsw-openshift:develop + ports: + - containerPort: 9000 + env: + - name: LARAVEL_DATABASE_TYPE + valueFrom: + configMapKeyRef: + name: sample-config + key: database-type + - name: LARAVEL_DATABASE_HOST + valueFrom: + configMapKeyRef: + name: sample-config + key: database-host + - name: LARAVEL_DATABASE_PORT_NUMBER + valueFrom: + configMapKeyRef: + name: sample-config + key: database-port-number + - name: LARAVEL_DATABASE_NAME + valueFrom: + configMapKeyRef: + name: sample-config + key: database-name + - name: LARAVEL_DATABASE_USER + valueFrom: + configMapKeyRef: + name: mariadb-config + key: mariadb-user + - name: LARAVEL_DATABASE_PASSWORD + valueFrom: + secretKeyRef: + name: mariadb-secret + key: mariadb-password From 4464ecadd88fba28628747e55ea6c44e719c79cd Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 2 Jul 2024 10:34:42 +0200 Subject: [PATCH 58/69] sample config. --- .github/workflows/docker-image-Frontend.yml | 4 ++-- .github/workflows/docker-image-Laravel.yml | 4 ++-- .github/workflows/docker-image.yml | 18 ------------------ 3 files changed, 4 insertions(+), 22 deletions(-) delete mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image-Frontend.yml b/.github/workflows/docker-image-Frontend.yml index c84994a..528f81f 100644 --- a/.github/workflows/docker-image-Frontend.yml +++ b/.github/workflows/docker-image-Frontend.yml @@ -1,4 +1,4 @@ -name: Create and publish a Docker image +name: Create and publish Frontend Docker image # Configures this workflow to run every time a change is pushed to the branch called `release`. on: @@ -56,7 +56,7 @@ jobs: id: push uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 with: - file: ./openshift/openshift.dockerfile + file: ./openshift/frontend.dockerfile context: . push: true tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 19c78d9..aae6f0d 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -1,4 +1,4 @@ -name: Create and publish a Docker image +name: Create and publish Backend Docker image # Configures this workflow to run every time a change is pushed to the branch called `release`. on: @@ -11,7 +11,7 @@ on: # Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. env: REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} + IMAGE_NAME: ${{ github.repository }}-backend TAG_NAME: ${{ github.repository }} # There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml deleted file mode 100644 index 4922ec6..0000000 --- a/.github/workflows/docker-image.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Docker Image CI - -on: - push: - branches: [ "develop" ] - pull_request: - branches: [ "develop" ] - -jobs: - - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Build the Docker image - run: docker build . --file ./openshift/openshift.dockerfile --tag my-image-name:$(date +%s) From 6ec3caae22f6daf052cba52c6aba259d5fd18601 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 2 Jul 2024 10:46:20 +0200 Subject: [PATCH 59/69] Correct naming githubactions. --- .github/workflows/docker-image-Frontend.yml | 2 +- .github/workflows/docker-image-Laravel.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image-Frontend.yml b/.github/workflows/docker-image-Frontend.yml index 528f81f..bfcc192 100644 --- a/.github/workflows/docker-image-Frontend.yml +++ b/.github/workflows/docker-image-Frontend.yml @@ -16,7 +16,7 @@ env: # There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. jobs: - build-and-push-image: + build-and-push-frontend-image: runs-on: ubuntu-latest # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. permissions: diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index aae6f0d..ccc5100 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -16,7 +16,7 @@ env: # There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. jobs: - build-and-push-image: + build-and-push-backen-image: runs-on: ubuntu-latest # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. permissions: From fcc272ba04ae011aa4cca3db3920584aa72bcc4d Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 2 Jul 2024 10:46:35 +0200 Subject: [PATCH 60/69] openshift config. --- openshift/config/07_sample-app.yaml | 2 +- openshift/config/09_sample-front-cm.yaml | 10 +++------- openshift/config/10_sample-front.yaml | 18 +++++++++--------- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/openshift/config/07_sample-app.yaml b/openshift/config/07_sample-app.yaml index c5fa85b..4437c8c 100644 --- a/openshift/config/07_sample-app.yaml +++ b/openshift/config/07_sample-app.yaml @@ -17,7 +17,7 @@ spec: spec: containers: - name: sample-app - image: ghcr.io/utrechtuniversity/fsw-openshift:develop + image: ghcr.io/utrechtuniversity/fsw-openshift:pr6 ports: - containerPort: 9000 env: diff --git a/openshift/config/09_sample-front-cm.yaml b/openshift/config/09_sample-front-cm.yaml index 0c6b9e5..6d0efdb 100644 --- a/openshift/config/09_sample-front-cm.yaml +++ b/openshift/config/09_sample-front-cm.yaml @@ -2,11 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: sample-config + name: sample-frontend-config data: - database-type: mysql - database-host: mariadb-sample - database-port-number: '3306' - database-name: sample-database - oidc-provider-url: https://login.acc.uu.nl/nidp/oauth/nam - oidc-slo-link: https://login.acc.uu.nl/nidp/app/logout \ No newline at end of file + vite-api-url: app.openshift.fss.uu.nl + vite-port: '7050' \ No newline at end of file diff --git a/openshift/config/10_sample-front.yaml b/openshift/config/10_sample-front.yaml index 9e85e3d..ea84337 100644 --- a/openshift/config/10_sample-front.yaml +++ b/openshift/config/10_sample-front.yaml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: fsw-sample-app + name: fsw-sample-front labels: app: fsw-sample-app app.kubernetes.io/part-of: fsw-sample-app @@ -16,18 +16,18 @@ spec: app: sample-front spec: containers: - - name: sample-app - image: ghcr.io/utrechtuniversity/fsw-openshift:develop + - name: sample-front + image: ghcr.io/utrechtuniversity/fsw-openshift-frontend:pr-6 ports: - containerPort: 7050 env: - - name: LARAVEL_DATABASE_TYPE + - name: VITE_API_URL valueFrom: configMapKeyRef: - name: sample-config - key: database-type - - name: LARAVEL_DATABASE_HOST + name: sample-frontend-config + key: vite-api-url + - name: VITE_PORT valueFrom: configMapKeyRef: - name: sample-config - key: database-host + name: sample-frontend-config + key: vite-port From 3186cfc83cabe153559f46c4a997cf85740be314 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 2 Jul 2024 10:54:32 +0200 Subject: [PATCH 61/69] Correct permissions. --- openshift/frontend-entrypoint.sh | 1 + openshift/frontend.dockerfile | 3 +++ 2 files changed, 4 insertions(+) diff --git a/openshift/frontend-entrypoint.sh b/openshift/frontend-entrypoint.sh index a1231a5..2c29662 100644 --- a/openshift/frontend-entrypoint.sh +++ b/openshift/frontend-entrypoint.sh @@ -1,4 +1,5 @@ #!/usr/bin/env sh echo "⭐️ Start dev server" + npm run dev diff --git a/openshift/frontend.dockerfile b/openshift/frontend.dockerfile index 770cdf7..27e30e5 100644 --- a/openshift/frontend.dockerfile +++ b/openshift/frontend.dockerfile @@ -10,6 +10,9 @@ COPY .. /var/www RUN npm install RUN npm run build +RUN chmod -R a+rw vite.conifg.js +RUN chmod -R a+rw /var/www/public/build + # entrypoint COPY ./docker/frontend-entrypoint.sh /entrypoint.sh RUN chmod ugo+x /entrypoint.sh From 6b72d87721ee7a9cb00aa54fb816f9e712bed9f6 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 2 Jul 2024 11:49:12 +0200 Subject: [PATCH 62/69] Typo and removed composer install on frontend. --- .github/workflows/docker-image-Frontend.yml | 4 ---- docker-compose.yml | 4 ++-- docker/frontend.dockerfile | 3 +++ openshift/frontend.dockerfile | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-image-Frontend.yml b/.github/workflows/docker-image-Frontend.yml index bfcc192..8a5faa0 100644 --- a/.github/workflows/docker-image-Frontend.yml +++ b/.github/workflows/docker-image-Frontend.yml @@ -48,10 +48,6 @@ jobs: # This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages. # It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository. # It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. - - name: Install dependencies - env: - COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{secrets.COMPOSER_AUTH}}"} }' # [tl! **] - run: composer update && composer install --prefer-dist --no-suggest --no-progress - name: Build and push Docker image id: push uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 diff --git a/docker-compose.yml b/docker-compose.yml index aefee1e..c038480 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,8 +17,8 @@ services: build: dockerfile: docker/frontend.dockerfile volumes: - - ./:/var/www/public - working_dir: /var/www/public + - ./:/var/www + working_dir: /var/www ports: - "7050:7050" networks: diff --git a/docker/frontend.dockerfile b/docker/frontend.dockerfile index 770cdf7..691bfea 100644 --- a/docker/frontend.dockerfile +++ b/docker/frontend.dockerfile @@ -10,6 +10,9 @@ COPY .. /var/www RUN npm install RUN npm run build +RUN chmod a+rw /var/www/vite.config.js +RUN chmod -R a+rw /var/www/publilc/build + # entrypoint COPY ./docker/frontend-entrypoint.sh /entrypoint.sh RUN chmod ugo+x /entrypoint.sh diff --git a/openshift/frontend.dockerfile b/openshift/frontend.dockerfile index 27e30e5..691bfea 100644 --- a/openshift/frontend.dockerfile +++ b/openshift/frontend.dockerfile @@ -10,8 +10,8 @@ COPY .. /var/www RUN npm install RUN npm run build -RUN chmod -R a+rw vite.conifg.js -RUN chmod -R a+rw /var/www/public/build +RUN chmod a+rw /var/www/vite.config.js +RUN chmod -R a+rw /var/www/publilc/build # entrypoint COPY ./docker/frontend-entrypoint.sh /entrypoint.sh From c8065da01bc35e7d661077fe2ecc05f3bc2abb14 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 2 Jul 2024 11:50:15 +0200 Subject: [PATCH 63/69] Typo --- docker/frontend.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/frontend.dockerfile b/docker/frontend.dockerfile index 691bfea..503607b 100644 --- a/docker/frontend.dockerfile +++ b/docker/frontend.dockerfile @@ -11,7 +11,7 @@ RUN npm install RUN npm run build RUN chmod a+rw /var/www/vite.config.js -RUN chmod -R a+rw /var/www/publilc/build +RUN chmod -R a+rw /var/www/public/build # entrypoint COPY ./docker/frontend-entrypoint.sh /entrypoint.sh From 13cdcf39899504c2a35c3896023a3b001591390e Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 2 Jul 2024 11:52:48 +0200 Subject: [PATCH 64/69] Typo --- openshift/frontend.dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openshift/frontend.dockerfile b/openshift/frontend.dockerfile index 691bfea..be51af7 100644 --- a/openshift/frontend.dockerfile +++ b/openshift/frontend.dockerfile @@ -10,8 +10,8 @@ COPY .. /var/www RUN npm install RUN npm run build -RUN chmod a+rw /var/www/vite.config.js -RUN chmod -R a+rw /var/www/publilc/build +RUN chmod a+rw /var/www/vite.config.js \ +RUN chmod -R a+rw /var/www/public/build # entrypoint COPY ./docker/frontend-entrypoint.sh /entrypoint.sh From 053f069d2e210ef9a1dd63b9bb65afbdcf4b8f06 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 2 Jul 2024 11:56:43 +0200 Subject: [PATCH 65/69] Typo --- .github/workflows/docker-image-Laravel.yml | 2 +- openshift/frontend.dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index ccc5100..4496a10 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -16,7 +16,7 @@ env: # There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. jobs: - build-and-push-backen-image: + build-and-push-backend-image: runs-on: ubuntu-latest # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. permissions: diff --git a/openshift/frontend.dockerfile b/openshift/frontend.dockerfile index be51af7..503607b 100644 --- a/openshift/frontend.dockerfile +++ b/openshift/frontend.dockerfile @@ -10,7 +10,7 @@ COPY .. /var/www RUN npm install RUN npm run build -RUN chmod a+rw /var/www/vite.config.js \ +RUN chmod a+rw /var/www/vite.config.js RUN chmod -R a+rw /var/www/public/build # entrypoint From 1aa213cbe8915906220d909bfc244d97e73b3aba Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 2 Jul 2024 14:49:04 +0200 Subject: [PATCH 66/69] permission issues frontend. --- docker/frontend-entrypoint.sh | 4 ---- docker/frontend.dockerfile | 19 +++++-------------- openshift/frontend-entrypoint.sh | 5 ----- openshift/frontend.dockerfile | 19 +++++-------------- 4 files changed, 10 insertions(+), 37 deletions(-) delete mode 100644 docker/frontend-entrypoint.sh delete mode 100644 openshift/frontend-entrypoint.sh diff --git a/docker/frontend-entrypoint.sh b/docker/frontend-entrypoint.sh deleted file mode 100644 index a1231a5..0000000 --- a/docker/frontend-entrypoint.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env sh - -echo "⭐️ Start dev server" -npm run dev diff --git a/docker/frontend.dockerfile b/docker/frontend.dockerfile index 503607b..8a2eeb1 100644 --- a/docker/frontend.dockerfile +++ b/docker/frontend.dockerfile @@ -1,21 +1,12 @@ FROM node:20-alpine # set workdir -RUN mkdir -p /var/www/ +RUN mkdir /var/www && chown node:node /var/www WORKDIR /var/www RUN apk add --no-cache git -# copy webapp files -COPY .. /var/www -RUN npm install -RUN npm run build - -RUN chmod a+rw /var/www/vite.config.js -RUN chmod -R a+rw /var/www/public/build +COPY --chown=node:node package.json package-lock.json* ./ -# entrypoint -COPY ./docker/frontend-entrypoint.sh /entrypoint.sh -RUN chmod ugo+x /entrypoint.sh -RUN dos2unix /entrypoint.sh - -ENTRYPOINT /entrypoint.sh +RUN npm install +EXPOSE 7050 +CMD "npm" "run" "build" \ No newline at end of file diff --git a/openshift/frontend-entrypoint.sh b/openshift/frontend-entrypoint.sh deleted file mode 100644 index 2c29662..0000000 --- a/openshift/frontend-entrypoint.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env sh - -echo "⭐️ Start dev server" - -npm run dev diff --git a/openshift/frontend.dockerfile b/openshift/frontend.dockerfile index 503607b..8a2eeb1 100644 --- a/openshift/frontend.dockerfile +++ b/openshift/frontend.dockerfile @@ -1,21 +1,12 @@ FROM node:20-alpine # set workdir -RUN mkdir -p /var/www/ +RUN mkdir /var/www && chown node:node /var/www WORKDIR /var/www RUN apk add --no-cache git -# copy webapp files -COPY .. /var/www -RUN npm install -RUN npm run build - -RUN chmod a+rw /var/www/vite.config.js -RUN chmod -R a+rw /var/www/public/build +COPY --chown=node:node package.json package-lock.json* ./ -# entrypoint -COPY ./docker/frontend-entrypoint.sh /entrypoint.sh -RUN chmod ugo+x /entrypoint.sh -RUN dos2unix /entrypoint.sh - -ENTRYPOINT /entrypoint.sh +RUN npm install +EXPOSE 7050 +CMD "npm" "run" "build" \ No newline at end of file From 8c685adedc5ced64ff42c2690351aca36c7d2c94 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 2 Jul 2024 15:02:18 +0200 Subject: [PATCH 67/69] Voorbeeld van container docs. --- docker/frontend.dockerfile | 5 +++++ openshift/frontend.dockerfile | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/docker/frontend.dockerfile b/docker/frontend.dockerfile index 8a2eeb1..1115252 100644 --- a/docker/frontend.dockerfile +++ b/docker/frontend.dockerfile @@ -7,6 +7,11 @@ RUN apk add --no-cache git COPY --chown=node:node package.json package-lock.json* ./ +#Naar het voorbeeld van: +#https://github.com/UtrechtUniversity/containerplatform-docs Apache rootless openshift +RUN chgrp -R 0 /var/www && \ + chmod -R g=u /var/www + RUN npm install EXPOSE 7050 CMD "npm" "run" "build" \ No newline at end of file diff --git a/openshift/frontend.dockerfile b/openshift/frontend.dockerfile index 8a2eeb1..a3c3be8 100644 --- a/openshift/frontend.dockerfile +++ b/openshift/frontend.dockerfile @@ -6,6 +6,10 @@ WORKDIR /var/www RUN apk add --no-cache git COPY --chown=node:node package.json package-lock.json* ./ +#Naar het voorbeeld van: +#https://github.com/UtrechtUniversity/containerplatform-docs Apache rootless openshift +RUN chgrp -R 0 /var/www && \ + chmod -R g=u /var/www RUN npm install EXPOSE 7050 From 66ee4cec6f465a9213c8d587bb408013e1b4683a Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 2 Jul 2024 15:33:22 +0200 Subject: [PATCH 68/69] Added oidc config. --- openshift/config/06_sample-app-cm.yaml | 4 +++- openshift/config/07_sample-app.yaml | 22 +++++++++++++++++++++- openshift/config/10_sample-front.yaml | 2 +- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/openshift/config/06_sample-app-cm.yaml b/openshift/config/06_sample-app-cm.yaml index 7356fb7..0c6b9e5 100644 --- a/openshift/config/06_sample-app-cm.yaml +++ b/openshift/config/06_sample-app-cm.yaml @@ -7,4 +7,6 @@ data: database-type: mysql database-host: mariadb-sample database-port-number: '3306' - database-name: sample-database \ No newline at end of file + database-name: sample-database + oidc-provider-url: https://login.acc.uu.nl/nidp/oauth/nam + oidc-slo-link: https://login.acc.uu.nl/nidp/app/logout \ No newline at end of file diff --git a/openshift/config/07_sample-app.yaml b/openshift/config/07_sample-app.yaml index 4437c8c..316aa0a 100644 --- a/openshift/config/07_sample-app.yaml +++ b/openshift/config/07_sample-app.yaml @@ -17,7 +17,7 @@ spec: spec: containers: - name: sample-app - image: ghcr.io/utrechtuniversity/fsw-openshift:pr6 + image: ghcr.io/utrechtuniversity/fsw-openshift:develop ports: - containerPort: 9000 env: @@ -41,11 +41,31 @@ spec: configMapKeyRef: name: sample-config key: database-name + - name: OIDC_PROVIDER_URL + valueFrom: + configMapKeyRef: + name: sample-config + key: oidc-provider-url + - name: OIDC_SLO_LINK + valueFrom: + configMapKeyRef: + name: sample-config + key: oidc-slo-link - name: LARAVEL_DATABASE_USER valueFrom: configMapKeyRef: name: mariadb-config key: mariadb-user + - name: OIDC_CLIENT_ID + valueFrom: + secretKeyRef: + name: sample-app-secret + key: oidc-client-id + - name: OIDC_CLIENT_SECRET + valueFrom: + secretKeyRef: + name: sample-app-secret + key: oidc-client-secret - name: LARAVEL_DATABASE_PASSWORD valueFrom: secretKeyRef: diff --git a/openshift/config/10_sample-front.yaml b/openshift/config/10_sample-front.yaml index ea84337..1608e29 100644 --- a/openshift/config/10_sample-front.yaml +++ b/openshift/config/10_sample-front.yaml @@ -17,7 +17,7 @@ spec: spec: containers: - name: sample-front - image: ghcr.io/utrechtuniversity/fsw-openshift-frontend:pr-6 + image: ghcr.io/utrechtuniversity/fsw-openshift-frontend:develop ports: - containerPort: 7050 env: From e5d78f290a76c4ff02cca89e5654d03a776268c7 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 2 Jul 2024 15:47:51 +0200 Subject: [PATCH 69/69] Added oidc config. --- docker/frontend.dockerfile | 4 ++-- openshift/frontend.dockerfile | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docker/frontend.dockerfile b/docker/frontend.dockerfile index 1115252..dd3ea6a 100644 --- a/docker/frontend.dockerfile +++ b/docker/frontend.dockerfile @@ -5,7 +5,7 @@ WORKDIR /var/www RUN apk add --no-cache git -COPY --chown=node:node package.json package-lock.json* ./ +COPY --chown=node:node package.json package-lock.json* vite.config.js ./ #Naar het voorbeeld van: #https://github.com/UtrechtUniversity/containerplatform-docs Apache rootless openshift @@ -14,4 +14,4 @@ RUN chgrp -R 0 /var/www && \ RUN npm install EXPOSE 7050 -CMD "npm" "run" "build" \ No newline at end of file +CMD "npm" "run" "dev" \ No newline at end of file diff --git a/openshift/frontend.dockerfile b/openshift/frontend.dockerfile index a3c3be8..dd3ea6a 100644 --- a/openshift/frontend.dockerfile +++ b/openshift/frontend.dockerfile @@ -5,7 +5,8 @@ WORKDIR /var/www RUN apk add --no-cache git -COPY --chown=node:node package.json package-lock.json* ./ +COPY --chown=node:node package.json package-lock.json* vite.config.js ./ + #Naar het voorbeeld van: #https://github.com/UtrechtUniversity/containerplatform-docs Apache rootless openshift RUN chgrp -R 0 /var/www && \ @@ -13,4 +14,4 @@ RUN chgrp -R 0 /var/www && \ RUN npm install EXPOSE 7050 -CMD "npm" "run" "build" \ No newline at end of file +CMD "npm" "run" "dev" \ No newline at end of file