From 04f13d567a2bac98a03002a19a04a5460caae207 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Thu, 30 May 2024 09:12:35 +0200 Subject: [PATCH 01/78] Fixed url issues. --- docker/nginx-entrypoint.sh | 5 +++++ docker/nginx.dockerfile | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 docker/nginx-entrypoint.sh diff --git a/docker/nginx-entrypoint.sh b/docker/nginx-entrypoint.sh new file mode 100644 index 0000000..1045ba9 --- /dev/null +++ b/docker/nginx-entrypoint.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +if [ "$APP_ENV" = "local" ]; then + cp ./docker/vhost.conf /etc/nginx/conf.d/default.conf +fi diff --git a/docker/nginx.dockerfile b/docker/nginx.dockerfile index c260a62..becf6c2 100644 --- a/docker/nginx.dockerfile +++ b/docker/nginx.dockerfile @@ -1,4 +1,6 @@ FROM nginx:1.10-alpine +# entrypoint +COPY ./docker/nginx-entrypoint.sh /entrypoint.sh +RUN chmod ugo+x /entrypoint.sh -RUN echo " ⭐️️️️️⭐️️️️️⭐️️️️️⭐️ VERSIE: 1 " -ADD ./docker/vhost.conf /etc/nginx/conf.d/default.conf +ENTRYPOINT /entrypoint.sh From 76bfdfb7e275a3275306e66a4c7e9d5b2fcebc75 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Thu, 30 May 2024 13:03:44 +0200 Subject: [PATCH 02/78] Fixed url issues. --- docker/nginx.dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/nginx.dockerfile b/docker/nginx.dockerfile index becf6c2..0d2e9b0 100644 --- a/docker/nginx.dockerfile +++ b/docker/nginx.dockerfile @@ -1,6 +1,6 @@ -FROM nginx:1.10-alpine +FROM nginxinc/nginx-unprivileged:stable-alpine # entrypoint -COPY ./docker/nginx-entrypoint.sh /entrypoint.sh -RUN chmod ugo+x /entrypoint.sh -ENTRYPOINT /entrypoint.sh +RUN echo " ⭐️️️️️Bind entrypoint" + +ADD ./docker/vhost.conf /etc/nginx/conf.d/default.conf From e1ea0b28ec69539fef48aa16bfc2ed1e2f04f8ab Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Thu, 30 May 2024 13:09:57 +0200 Subject: [PATCH 03/78] Tijdelijk --- docker/nginx.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/nginx.dockerfile b/docker/nginx.dockerfile index 0d2e9b0..ae83170 100644 --- a/docker/nginx.dockerfile +++ b/docker/nginx.dockerfile @@ -3,4 +3,4 @@ FROM nginxinc/nginx-unprivileged:stable-alpine RUN echo " ⭐️️️️️Bind entrypoint" -ADD ./docker/vhost.conf /etc/nginx/conf.d/default.conf +# ADD ./docker/vhost.conf /etc/nginx/conf.d/default.conf From a69de9851b216bab646e8f938c99cec51b75c581 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Thu, 30 May 2024 13:21:49 +0200 Subject: [PATCH 04/78] Tijdelijk --- docker/nginx.dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/nginx.dockerfile b/docker/nginx.dockerfile index ae83170..1528a8e 100644 --- a/docker/nginx.dockerfile +++ b/docker/nginx.dockerfile @@ -4,3 +4,6 @@ FROM nginxinc/nginx-unprivileged:stable-alpine RUN echo " ⭐️️️️️Bind entrypoint" # ADD ./docker/vhost.conf /etc/nginx/conf.d/default.conf +USER root +RUN chown -R nginx:nginx /usr/share/nginx/html +USER nginx From 78603ad8cf9fc727bb432f821542cd64c620d644 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Thu, 30 May 2024 13:27:16 +0200 Subject: [PATCH 05/78] Tijdelijk --- docker/nginx.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/nginx.dockerfile b/docker/nginx.dockerfile index 1528a8e..6518014 100644 --- a/docker/nginx.dockerfile +++ b/docker/nginx.dockerfile @@ -5,5 +5,5 @@ RUN echo " ⭐️️️️️Bind entrypoint" # ADD ./docker/vhost.conf /etc/nginx/conf.d/default.conf USER root -RUN chown -R nginx:nginx /usr/share/nginx/html +RUN chown -R nginx:nginx /usr/share/nginx/html /var/cache/nginx/client_temp /etc/nginx/nginx.conf USER nginx From 6bfe7b19597040a335ad729d97629d4dd94f1656 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Thu, 30 May 2024 13:28:34 +0200 Subject: [PATCH 06/78] Tijdelijk --- docker/nginx.dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/nginx.dockerfile b/docker/nginx.dockerfile index 6518014..99b7f4a 100644 --- a/docker/nginx.dockerfile +++ b/docker/nginx.dockerfile @@ -5,5 +5,7 @@ RUN echo " ⭐️️️️️Bind entrypoint" # ADD ./docker/vhost.conf /etc/nginx/conf.d/default.conf USER root -RUN chown -R nginx:nginx /usr/share/nginx/html /var/cache/nginx/client_temp /etc/nginx/nginx.conf +RUN chown -R nginx:nginx /usr/share/nginx/html +RUN chown -R nginx:nginx /var/cache/nginx/client_temp +RUN chown -R nginx:nginx /etc/nginx/nginx.conf USER nginx From 7d3ccca4038e97d0e44f92c570bf95c063ebf636 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Thu, 30 May 2024 13:30:45 +0200 Subject: [PATCH 07/78] Tijdelijk --- docker/nginx.dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/nginx.dockerfile b/docker/nginx.dockerfile index 99b7f4a..b7d4927 100644 --- a/docker/nginx.dockerfile +++ b/docker/nginx.dockerfile @@ -6,6 +6,7 @@ RUN echo " ⭐️️️️️Bind entrypoint" # ADD ./docker/vhost.conf /etc/nginx/conf.d/default.conf USER root RUN chown -R nginx:nginx /usr/share/nginx/html +RUN mkdir -p /var/cache/nginx/client_temp RUN chown -R nginx:nginx /var/cache/nginx/client_temp RUN chown -R nginx:nginx /etc/nginx/nginx.conf USER nginx From 6b6238b6bc93931f700d0e128694817e8f5c7c38 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Thu, 30 May 2024 13:33:49 +0200 Subject: [PATCH 08/78] Tijdelijk --- docker/nginx.dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/nginx.dockerfile b/docker/nginx.dockerfile index b7d4927..b15b6c6 100644 --- a/docker/nginx.dockerfile +++ b/docker/nginx.dockerfile @@ -3,7 +3,8 @@ FROM nginxinc/nginx-unprivileged:stable-alpine RUN echo " ⭐️️️️️Bind entrypoint" -# ADD ./docker/vhost.conf /etc/nginx/conf.d/default.conf +ADD ./docker/vhost.conf /etc/nginx/conf.d/default.conf + USER root RUN chown -R nginx:nginx /usr/share/nginx/html RUN mkdir -p /var/cache/nginx/client_temp From 6cb7bc180c1400a0e0a26eb4c996773d53040d49 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Thu, 30 May 2024 14:21:34 +0200 Subject: [PATCH 09/78] Tijdelijk --- docker/nginx.dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/nginx.dockerfile b/docker/nginx.dockerfile index b15b6c6..8d04f8a 100644 --- a/docker/nginx.dockerfile +++ b/docker/nginx.dockerfile @@ -7,7 +7,9 @@ ADD ./docker/vhost.conf /etc/nginx/conf.d/default.conf USER root RUN chown -R nginx:nginx /usr/share/nginx/html + RUN mkdir -p /var/cache/nginx/client_temp -RUN chown -R nginx:nginx /var/cache/nginx/client_temp +RUN chown -R $UID:$GID /var/cache/nginx/client_temp +#RUN chown -R nginx:nginx /var/cache/nginx/client_temp RUN chown -R nginx:nginx /etc/nginx/nginx.conf USER nginx From 9a97fc19b37fed2da3ef5a214d59e4fbf46f5cac Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 10:24:49 +0200 Subject: [PATCH 10/78] WIP --- DEMO.md | 36 ++++++++++++++ README.md | 69 +++------------------------ docker-compose.yml | 8 ++-- docker/backend.dockerfile | 16 ------- docker/docker.env | 2 +- docker/nginx-entrypoint.sh | 11 +++-- docker/nginx.dockerfile | 12 ----- openshift/sample/sample-app.yaml | 70 ++++++++++++++++++++++++++++ openshift/sample/sample-ingress.yaml | 16 +++++++ 9 files changed, 143 insertions(+), 97 deletions(-) create mode 100644 DEMO.md create mode 100644 openshift/sample/sample-app.yaml create mode 100644 openshift/sample/sample-ingress.yaml diff --git a/DEMO.md b/DEMO.md new file mode 100644 index 0000000..8fdd729 --- /dev/null +++ b/DEMO.md @@ -0,0 +1,36 @@ +## DEMO FSW-Openshift + +https://docs.cp.its.uu.nl/ + +https://github.com/UtrechtUniversity/containerplatform-docs + +`sshuttle --r shell 131.211.0.0/16` + +https://console.cp.its.uu.nl/ + +https://github.com/UtrechtUniversity/FSW-Openshift + +https://github.com/UtrechtUniversity/FSW-Openshift/pkgs/container/fsw-openshift + +https://github.com/UtrechtUniversity/wordpress-example-app + +local testing: + https://www.redhat.com/sysadmin/codeready-containers +Console: + https://console-openshift-console.apps-crc.testing + + + +CNAME ingress.cp.its.uu.nl +solid.net.uu.nl + +wp.openshift.fss.uu.nl +app.openshift.fss.uu.nl +laravel.openshift.fss.uu.nl + +registry.cp.its.uu.nl + +app grouperen met labels. + +desktop init: https://medium.com/@bisinet/simplify-application-dockerization-with-docker-init-6bc4c99db26f + diff --git a/README.md b/README.md index 1a4c26b..8e12e1e 100644 --- a/README.md +++ b/README.md @@ -1,66 +1,11 @@ -

Laravel Logo

+## About FSW-Openshift -

-Build Status -Total Downloads -Latest Stable Version -License -

+A first default laravel project with openshift. -## About Laravel +local testing: +https://www.redhat.com/sysadmin/codeready-containers -Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as: +`crc start -p //pull-secret.txt` -- [Simple, fast routing engine](https://laravel.com/docs/routing). -- [Powerful dependency injection container](https://laravel.com/docs/container). -- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. -- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). -- Database agnostic [schema migrations](https://laravel.com/docs/migrations). -- [Robust background job processing](https://laravel.com/docs/queues). -- [Real-time event broadcasting](https://laravel.com/docs/broadcasting). - -Laravel is accessible, powerful, and provides tools required for large, robust applications. - -## Learning Laravel - -Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. - -You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch. - -If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library. - -## Laravel Sponsors - -We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com). - -### Premium Partners - -- **[Vehikl](https://vehikl.com/)** -- **[Tighten Co.](https://tighten.co)** -- **[WebReinvent](https://webreinvent.com/)** -- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)** -- **[64 Robots](https://64robots.com)** -- **[Curotec](https://www.curotec.com/services/technologies/laravel/)** -- **[Cyber-Duck](https://cyber-duck.co.uk)** -- **[DevSquad](https://devsquad.com/hire-laravel-developers)** -- **[Jump24](https://jump24.co.uk)** -- **[Redberry](https://redberry.international/laravel/)** -- **[Active Logic](https://activelogic.com)** -- **[byte5](https://byte5.de)** -- **[OP.GG](https://op.gg)** - -## Contributing - -Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). - -## Code of Conduct - -In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). - -## Security Vulnerabilities - -If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed. - -## License - -The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). +Soms wil hij niet starten, dan moet je de vm verwijderen en opnieuw starten: +`crc cleanup` diff --git a/docker-compose.yml b/docker-compose.yml index 43e16d1..c3955cf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,8 +16,8 @@ services: container_name: openshift_frontend build: dockerfile: docker/frontend.dockerfile - environment: - - APP_ENV=local + args: + - APP_ENV=local volumes: - ./:/var/www/public working_dir: /var/www/public @@ -33,9 +33,11 @@ services: context: ./ dockerfile: docker/nginx.dockerfile environment: - - VIRTUAL_HOST=openshift.docker.dev + - VIRTUAL_HOST=app.openshift.fss.uu.nl - VIRTUAL_PROTO=http - VIRTUAL_PORT=80 + - NGINX_HOST=app.openshift.fss.uu.nl + - NGINX_PORT=8080 volumes: - ./:/var/www - ./storage/logs/:/var/log/nginx diff --git a/docker/backend.dockerfile b/docker/backend.dockerfile index 37ab184..c2cadd4 100644 --- a/docker/backend.dockerfile +++ b/docker/backend.dockerfile @@ -10,22 +10,6 @@ RUN apt-get -y dist-upgrade RUN apt-get install -y zip RUN apt-get install -y sudo nano -#RUN apt-get install -y git -#RUN apt-get install -y zip unzip libzip-dev -#RUN apt-get install -y wget -#RUN apt-get install -y sudo -#RUN apt-get install -y iputils-ping -#RUN apt-get install -y locales locales-all -# RUN apt-get install -y netcat - -#RUN apt-get install -y libxml2-dev libzip-dev libpng-dev -# -### run apache as non-root user -## https://takac.dev/docker-run-apache-as-non-root-user-based-on-the-official-image/ -#RUN apt-get install -y libcap2-bin procps -#RUN setcap 'cap_net_bind_service=+ep' /usr/sbin/apache2 -#RUN chown -R www-data:www-data /var/log/apache2 -# RUN chown -R www-data:www-data /usr/local/bin/apache2-foreground # install additional PHP extensions RUN apt-get install -y libmcrypt-dev \ diff --git a/docker/docker.env b/docker/docker.env index 698d740..5a218d9 100644 --- a/docker/docker.env +++ b/docker/docker.env @@ -2,7 +2,7 @@ APP_NAME=Openshift APP_ENV=acceptance APP_KEY= APP_DEBUG=true -APP_URL=http://openshift.docker.dev +APP_URL=https://app.openshift.fss.uu.nl/ LOG_CHANNEL=stack LOG_DEPRECATIONS_CHANNEL=null diff --git a/docker/nginx-entrypoint.sh b/docker/nginx-entrypoint.sh index 1045ba9..ee5b699 100644 --- a/docker/nginx-entrypoint.sh +++ b/docker/nginx-entrypoint.sh @@ -1,5 +1,10 @@ #!/usr/bin/env sh -if [ "$APP_ENV" = "local" ]; then - cp ./docker/vhost.conf /etc/nginx/conf.d/default.conf -fi +NOT USED FOR NOW +#echo " ⭐️️️️️copy conf file" +#ls -la +##if [ "$APP_ENV" = "local" ]; then +## cp /var/www/docker/vhost.conf /etc/nginx/conf.d/default.conf +##fi +#systemctl status nginx +#systemctl start nginx diff --git a/docker/nginx.dockerfile b/docker/nginx.dockerfile index 8d04f8a..b87dec5 100644 --- a/docker/nginx.dockerfile +++ b/docker/nginx.dockerfile @@ -1,15 +1,3 @@ FROM nginxinc/nginx-unprivileged:stable-alpine -# entrypoint - -RUN echo " ⭐️️️️️Bind entrypoint" ADD ./docker/vhost.conf /etc/nginx/conf.d/default.conf - -USER root -RUN chown -R nginx:nginx /usr/share/nginx/html - -RUN mkdir -p /var/cache/nginx/client_temp -RUN chown -R $UID:$GID /var/cache/nginx/client_temp -#RUN chown -R nginx:nginx /var/cache/nginx/client_temp -RUN chown -R nginx:nginx /etc/nginx/nginx.conf -USER nginx diff --git a/openshift/sample/sample-app.yaml b/openshift/sample/sample-app.yaml new file mode 100644 index 0000000..e8797a1 --- /dev/null +++ b/openshift/sample/sample-app.yaml @@ -0,0 +1,70 @@ +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:e236e3734181 +# image: bitnami/laravel:latest + ports: + - containerPort: 8080 + 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 +--- +apiVersion: v1 +kind: Service +metadata: + name: fsw-sample-app + labels: + app: fsw-sample-app + app.kubernetes.io/part-of: fsw-sample-app +spec: + selector: + app: fsw-sample-app + ports: + - protocol: TCP + port: 80 + targetPort: 8080 +--- diff --git a/openshift/sample/sample-ingress.yaml b/openshift/sample/sample-ingress.yaml new file mode 100644 index 0000000..aa5725a --- /dev/null +++ b/openshift/sample/sample-ingress.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: sample-ingress +spec: + rules: + - host: app.openshift.fss.uu.nl # Replace with your desired hostname + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: sample-app + port: + number: 80 From 57f9eae78dc35e865116450a4029b639015a9781 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 10:25:09 +0200 Subject: [PATCH 11/78] WIP --- openshift/sample/mariadb-cm.yaml | 8 +++ openshift/sample/mariadb-secret.yaml | 11 +++++ openshift/sample/mariadb-statefulset.yaml | 60 +++++++++++++++++++++++ openshift/sample/mariadb-svc.yaml | 14 ++++++ openshift/sample/sample-app-cm.yaml | 13 +++++ openshift/scripts/sample-app.sh | 60 +++++++++++++++++++++++ 6 files changed, 166 insertions(+) create mode 100644 openshift/sample/mariadb-cm.yaml create mode 100644 openshift/sample/mariadb-secret.yaml create mode 100644 openshift/sample/mariadb-statefulset.yaml create mode 100644 openshift/sample/mariadb-svc.yaml create mode 100644 openshift/sample/sample-app-cm.yaml create mode 100755 openshift/scripts/sample-app.sh diff --git a/openshift/sample/mariadb-cm.yaml b/openshift/sample/mariadb-cm.yaml new file mode 100644 index 0000000..812d7e4 --- /dev/null +++ b/openshift/sample/mariadb-cm.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: mariadb-config +data: + mariadb-database: development + mariadb-user: development diff --git a/openshift/sample/mariadb-secret.yaml b/openshift/sample/mariadb-secret.yaml new file mode 100644 index 0000000..abe9f6d --- /dev/null +++ b/openshift/sample/mariadb-secret.yaml @@ -0,0 +1,11 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + name: mariadb-secret +type: Opaque +data: + # Use the following command to generate a random password: + # echo -n 'ChangeThisSuperSecretPassword' | base64 + mariadb-root-password: c2VjcmV0 + mariadb-password: c2VjcmV0 diff --git a/openshift/sample/mariadb-statefulset.yaml b/openshift/sample/mariadb-statefulset.yaml new file mode 100644 index 0000000..e296173 --- /dev/null +++ b/openshift/sample/mariadb-statefulset.yaml @@ -0,0 +1,60 @@ +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: mariadb + labels: + app: fsw-sample-app + app.kubernetes.io/part-of: fsw-sample-app +spec: + serviceName: mariadb + replicas: 1 + selector: + matchLabels: + app: mariadb + template: + metadata: + labels: + app: mariadb + spec: + containers: + - name: mariadb + image: bitnami/mariadb:latest + resources: + limits: + memory: 512Mi + cpu: "0.3" + env: + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: mariadb-secret + key: mariadb-root-password + - name: MARIADB_DATABASE + valueFrom: + configMapKeyRef: + name: mariadb-config + key: mariadb-database + - name: MARIADB_USER + valueFrom: + configMapKeyRef: + name: mariadb-config + key: mariadb-user + - name: MARIADB_PASSWORD + valueFrom: + secretKeyRef: + name: mariadb-secret + key: mariadb-password + ports: + - containerPort: 3306 + volumeMounts: + - name: mariadb-persistent-storage + mountPath: /bitnami/mariadb + volumeClaimTemplates: + - metadata: + name: mariadb-persistent-storage + spec: + accessModes: ["ReadWriteOnce"] + resources: + requests: + storage: 10Gi diff --git a/openshift/sample/mariadb-svc.yaml b/openshift/sample/mariadb-svc.yaml new file mode 100644 index 0000000..6f3fcbb --- /dev/null +++ b/openshift/sample/mariadb-svc.yaml @@ -0,0 +1,14 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: mariadb + labels: + app: fsw-sample-app + app.kubernetes.io/part-of: fsw-sample-app +spec: + ports: + - port: 3306 + targetPort: 3306 + selector: + app: mariadb diff --git a/openshift/sample/sample-app-cm.yaml b/openshift/sample/sample-app-cm.yaml new file mode 100644 index 0000000..22a13c4 --- /dev/null +++ b/openshift/sample/sample-app-cm.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: sample-config +data: + database-type: mysql + database-host: mariadb + database-port-number: '3306' + database-name: openshift_myapp +# wordpress-enable-https: 'yes' +# wordpress-enable-reverse-proxy: 'yes' + # Change the following to your blog name, email, first name and last name \ No newline at end of file diff --git a/openshift/scripts/sample-app.sh b/openshift/scripts/sample-app.sh new file mode 100755 index 0000000..604e55a --- /dev/null +++ b/openshift/scripts/sample-app.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +# This script is used to create or delete the wordpress app in the cluster +# It uses the correct order of resource yamls to create or delete the app +# Make sure you have logged in to the cluster before running this script, +# and you are in the correct project with sufficient permissions. + +# List of resource yamls + +# Function to create the list of resource yamls +create_app() { + search_dir=../sample + for entry in "$search_dir"/* + do + echo "$entry" + oc apply -f $entry + done +} + +# Function to create the list of resource yamls +delete_app() { + search_dir=.. + for entry in "$search_dir"/* + do + echo "$entry" + oc delete -f $entry + done +} + +# Function to display the menu +show_menu() { + echo "Please choose an option:" + echo "1) create sample app" + echo "2) delete sample app" + echo "3) exit" +} + +# Main script loop +while true; do + show_menu + read -p "Enter your choice: " choice + + case $choice in + 1) + create_app + break + ;; + 2) + delete_app + break + ;; + 3) + echo "Exiting the script." + break + ;; + *) + echo "Invalid option, please try again." + ;; + esac +done From b3ff14851167de0b766bc5f5bb8ce1b37e7d8f3f Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 10:40:41 +0200 Subject: [PATCH 12/78] WIP --- docker/backend.dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/backend.dockerfile b/docker/backend.dockerfile index c2cadd4..8ddad11 100644 --- a/docker/backend.dockerfile +++ b/docker/backend.dockerfile @@ -41,6 +41,7 @@ RUN cd /usr/local/share/ca-certificates && update-ca-certificates COPY ./docker/docker.env /var/www/.env +RUN chown -R www-data:www-data /var/www RUN php artisan key:generate # entrypoint From ae6295ce91a645d23a0c4e58336208835522c9d8 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 10:55:38 +0200 Subject: [PATCH 13/78] WIP --- composer.json | 1 + composer.lock | 395 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 395 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8a3d72d..52ef45c 100644 --- a/composer.json +++ b/composer.json @@ -6,6 +6,7 @@ "license": "MIT", "require": { "php": "^8.1", + "doctrine/dbal": "^3.8", "guzzlehttp/guzzle": "^7.2", "laravel/framework": "^10.10", "laravel/sanctum": "^3.3", diff --git a/composer.lock b/composer.lock index 07ba6eb..be6a4d7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9c491b8531eec05ba41a11d9276a5749", + "content-hash": "41be7053117aa17db65c61cf8d2d38fe", "packages": [ { "name": "brick/math", @@ -210,6 +210,350 @@ }, "time": "2022-10-27T11:44:00+00:00" }, + { + "name": "doctrine/cache", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "1ca8f21980e770095a31456042471a57bc4c68fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/1ca8f21980e770095a31456042471a57bc4c68fb", + "reference": "1ca8f21980e770095a31456042471a57bc4c68fb", + "shasum": "" + }, + "require": { + "php": "~7.1 || ^8.0" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/coding-standard": "^9", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psr/cache": "^1.0 || ^2.0 || ^3.0", + "symfony/cache": "^4.4 || ^5.4 || ^6", + "symfony/var-exporter": "^4.4 || ^5.4 || ^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.", + "homepage": "https://www.doctrine-project.org/projects/cache.html", + "keywords": [ + "abstraction", + "apcu", + "cache", + "caching", + "couchdb", + "memcached", + "php", + "redis", + "xcache" + ], + "support": { + "issues": "https://github.com/doctrine/cache/issues", + "source": "https://github.com/doctrine/cache/tree/2.2.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache", + "type": "tidelift" + } + ], + "time": "2022-05-20T20:07:39+00:00" + }, + { + "name": "doctrine/dbal", + "version": "3.8.6", + "source": { + "type": "git", + "url": "https://github.com/doctrine/dbal.git", + "reference": "b7411825cf7efb7e51f9791dea19d86e43b399a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/b7411825cf7efb7e51f9791dea19d86e43b399a1", + "reference": "b7411825cf7efb7e51f9791dea19d86e43b399a1", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2", + "doctrine/cache": "^1.11|^2.0", + "doctrine/deprecations": "^0.5.3|^1", + "doctrine/event-manager": "^1|^2", + "php": "^7.4 || ^8.0", + "psr/cache": "^1|^2|^3", + "psr/log": "^1|^2|^3" + }, + "require-dev": { + "doctrine/coding-standard": "12.0.0", + "fig/log-test": "^1", + "jetbrains/phpstorm-stubs": "2023.1", + "phpstan/phpstan": "1.11.5", + "phpstan/phpstan-strict-rules": "^1.6", + "phpunit/phpunit": "9.6.19", + "psalm/plugin-phpunit": "0.18.4", + "slevomat/coding-standard": "8.13.1", + "squizlabs/php_codesniffer": "3.10.1", + "symfony/cache": "^5.4|^6.0|^7.0", + "symfony/console": "^4.4|^5.4|^6.0|^7.0", + "vimeo/psalm": "4.30.0" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "bin": [ + "bin/doctrine-dbal" + ], + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\DBAL\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.", + "homepage": "https://www.doctrine-project.org/projects/dbal.html", + "keywords": [ + "abstraction", + "database", + "db2", + "dbal", + "mariadb", + "mssql", + "mysql", + "oci8", + "oracle", + "pdo", + "pgsql", + "postgresql", + "queryobject", + "sasql", + "sql", + "sqlite", + "sqlserver", + "sqlsrv" + ], + "support": { + "issues": "https://github.com/doctrine/dbal/issues", + "source": "https://github.com/doctrine/dbal/tree/3.8.6" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", + "type": "tidelift" + } + ], + "time": "2024-06-19T10:38:17+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/1.1.3" + }, + "time": "2024-01-30T19:34:25+00:00" + }, + { + "name": "doctrine/event-manager", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/event-manager.git", + "reference": "b680156fa328f1dfd874fd48c7026c41570b9c6e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/b680156fa328f1dfd874fd48c7026c41570b9c6e", + "reference": "b680156fa328f1dfd874fd48c7026c41570b9c6e", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "conflict": { + "doctrine/common": "<2.9" + }, + "require-dev": { + "doctrine/coding-standard": "^12", + "phpstan/phpstan": "^1.8.8", + "phpunit/phpunit": "^10.5", + "vimeo/psalm": "^5.24" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", + "homepage": "https://www.doctrine-project.org/projects/event-manager.html", + "keywords": [ + "event", + "event dispatcher", + "event manager", + "event system", + "events" + ], + "support": { + "issues": "https://github.com/doctrine/event-manager/issues", + "source": "https://github.com/doctrine/event-manager/tree/2.0.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager", + "type": "tidelift" + } + ], + "time": "2024-05-22T20:47:39+00:00" + }, { "name": "doctrine/inflector", "version": "2.0.10", @@ -2475,6 +2819,55 @@ ], "time": "2023-11-12T21:59:55+00:00" }, + { + "name": "psr/cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "time": "2021-02-03T23:26:27+00:00" + }, { "name": "psr/clock", "version": "1.0.0", From 905301aa80bdfa27b643989253d530de725ea417 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 11:01:47 +0200 Subject: [PATCH 14/78] WIP --- docker/backend-entrypoint.sh | 2 +- openshift/sample/sample-app.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/backend-entrypoint.sh b/docker/backend-entrypoint.sh index 97b5ce5..c638a19 100644 --- a/docker/backend-entrypoint.sh +++ b/docker/backend-entrypoint.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash echo " ⭐️️️️️⭐️️️️️⭐️️️️️⭐️ VERSIE: 1 " # run artisan migrate & seed - +ls -la /var/www if [ "$APP_ENV" = "local" ]; then ## in de dockerfile worden de dev packages verwijderd, dus die moeten we eerst installeren php composer.phar install diff --git a/openshift/sample/sample-app.yaml b/openshift/sample/sample-app.yaml index e8797a1..a0df72b 100644 --- a/openshift/sample/sample-app.yaml +++ b/openshift/sample/sample-app.yaml @@ -17,7 +17,7 @@ spec: spec: containers: - name: sample-app - image: ghcr.io/utrechtuniversity/fsw-openshift:e236e3734181 + image: ghcr.io/utrechtuniversity/fsw-openshift:latest # image: bitnami/laravel:latest ports: - containerPort: 8080 From bda6fa4984dbcfc00689e60e1f273bf5d2ac9449 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 11:34:11 +0200 Subject: [PATCH 15/78] WIP --- openshift/sample/mariadb-statefulset.yaml | 10 +++++----- openshift/sample/mariadb-svc.yaml | 2 +- openshift/sample/sample-app-cm.yaml | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/openshift/sample/mariadb-statefulset.yaml b/openshift/sample/mariadb-statefulset.yaml index e296173..472aea3 100644 --- a/openshift/sample/mariadb-statefulset.yaml +++ b/openshift/sample/mariadb-statefulset.yaml @@ -2,23 +2,23 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - name: mariadb + name: mariadb-sample labels: app: fsw-sample-app app.kubernetes.io/part-of: fsw-sample-app spec: - serviceName: mariadb + serviceName: mariadb-sample replicas: 1 selector: matchLabels: - app: mariadb + app: mariadb-sample template: metadata: labels: - app: mariadb + app: mariadb-sample spec: containers: - - name: mariadb + - name: mariadb-sample image: bitnami/mariadb:latest resources: limits: diff --git a/openshift/sample/mariadb-svc.yaml b/openshift/sample/mariadb-svc.yaml index 6f3fcbb..0003025 100644 --- a/openshift/sample/mariadb-svc.yaml +++ b/openshift/sample/mariadb-svc.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: - name: mariadb + name: mariadb-sample labels: app: fsw-sample-app app.kubernetes.io/part-of: fsw-sample-app diff --git a/openshift/sample/sample-app-cm.yaml b/openshift/sample/sample-app-cm.yaml index 22a13c4..100f765 100644 --- a/openshift/sample/sample-app-cm.yaml +++ b/openshift/sample/sample-app-cm.yaml @@ -5,9 +5,9 @@ metadata: name: sample-config data: database-type: mysql - database-host: mariadb + database-host: mariadb-sample database-port-number: '3306' - database-name: openshift_myapp + database-name: development # wordpress-enable-https: 'yes' # wordpress-enable-reverse-proxy: 'yes' # Change the following to your blog name, email, first name and last name \ No newline at end of file From 15c096b71870787b6096c2961cbaa70a3e6d95e1 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 11:43:05 +0200 Subject: [PATCH 16/78] WIP --- docker/backend-entrypoint.sh | 12 ++++++------ docker/docker.env | 2 +- openshift/scripts/sample-app.sh | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docker/backend-entrypoint.sh b/docker/backend-entrypoint.sh index c638a19..d0501e5 100644 --- a/docker/backend-entrypoint.sh +++ b/docker/backend-entrypoint.sh @@ -2,14 +2,14 @@ echo " ⭐️️️️️⭐️️️️️⭐️️️️️⭐️ VERSIE: 1 " # run artisan migrate & seed ls -la /var/www -if [ "$APP_ENV" = "local" ]; then - ## in de dockerfile worden de dev packages verwijderd, dus die moeten we eerst installeren - php composer.phar install +#if [ "$APP_ENV" = "local" ]; then +# ## in de dockerfile worden de dev packages verwijderd, dus die moeten we eerst installeren +# php composer.phar install echo "⭐️ Run artisan migrate"; php artisan migrate --seed - echo "⭐️ generate key"; - php artisan key:generate -fi +# echo "⭐️ generate key"; +# php artisan key:generate +#fi php-fpm diff --git a/docker/docker.env b/docker/docker.env index 5a218d9..3c8a98e 100644 --- a/docker/docker.env +++ b/docker/docker.env @@ -9,7 +9,7 @@ LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug DB_CONNECTION=mysql -DB_HOST=mariadb +DB_HOST=mariadb-sample DB_PORT=3306 DB_DATABASE=development DB_USERNAME=development diff --git a/openshift/scripts/sample-app.sh b/openshift/scripts/sample-app.sh index 604e55a..1ac26d9 100755 --- a/openshift/scripts/sample-app.sh +++ b/openshift/scripts/sample-app.sh @@ -19,7 +19,7 @@ create_app() { # Function to create the list of resource yamls delete_app() { - search_dir=.. + search_dir=../sample for entry in "$search_dir"/* do echo "$entry" From 5a27bebd1e304f1bbde2f318c224a4238d9b73ac Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 11:44:16 +0200 Subject: [PATCH 17/78] WIP --- storage/logs/laravel.log | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 storage/logs/laravel.log diff --git a/storage/logs/laravel.log b/storage/logs/laravel.log new file mode 100644 index 0000000..e69de29 From 993df8b59356c7bb9972fc0fff6531b2e07a10e2 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 13:22:33 +0200 Subject: [PATCH 18/78] WIP --- docker/backend-entrypoint.sh | 1 + docker/backend.dockerfile | 8 +++++--- .../sample/{mariadb-secret.yaml => 1_mariadb-secret.yaml} | 0 openshift/sample/{mariadb-cm.yaml => 2_mariadb-cm.yaml} | 0 ...ariadb-statefulset.yaml => 3_mariadb-statefulset.yaml} | 0 openshift/sample/{mariadb-svc.yaml => 4_mariadb-svc.yaml} | 2 +- .../sample/{sample-app-cm.yaml => 5_sample-app-cm.yaml} | 0 openshift/sample/{sample-app.yaml => 6_sample-app.yaml} | 0 .../sample/{sample-ingress.yaml => 7_sample-ingress.yaml} | 0 9 files changed, 7 insertions(+), 4 deletions(-) rename openshift/sample/{mariadb-secret.yaml => 1_mariadb-secret.yaml} (100%) rename openshift/sample/{mariadb-cm.yaml => 2_mariadb-cm.yaml} (100%) rename openshift/sample/{mariadb-statefulset.yaml => 3_mariadb-statefulset.yaml} (100%) rename openshift/sample/{mariadb-svc.yaml => 4_mariadb-svc.yaml} (89%) rename openshift/sample/{sample-app-cm.yaml => 5_sample-app-cm.yaml} (100%) rename openshift/sample/{sample-app.yaml => 6_sample-app.yaml} (100%) rename openshift/sample/{sample-ingress.yaml => 7_sample-ingress.yaml} (100%) diff --git a/docker/backend-entrypoint.sh b/docker/backend-entrypoint.sh index d0501e5..a2608b1 100644 --- a/docker/backend-entrypoint.sh +++ b/docker/backend-entrypoint.sh @@ -12,4 +12,5 @@ ls -la /var/www # echo "⭐️ generate key"; # php artisan key:generate #fi +php artisan serve --host=0.0.0.0 --port=8080 php-fpm diff --git a/docker/backend.dockerfile b/docker/backend.dockerfile index 8ddad11..2f8a1b9 100644 --- a/docker/backend.dockerfile +++ b/docker/backend.dockerfile @@ -41,7 +41,7 @@ RUN cd /usr/local/share/ca-certificates && update-ca-certificates COPY ./docker/docker.env /var/www/.env -RUN chown -R www-data:www-data /var/www +RUN chmod a+w -R /var/www/storage RUN php artisan key:generate # entrypoint @@ -51,7 +51,9 @@ RUN chmod ugo+x /entrypoint.sh RUN php artisan optimize # Expose port 8443 and start php-fpm server -# EXPOSE 443 -CMD ["php-fpm"] +EXPOSE 8080 ENTRYPOINT /entrypoint.sh + +CMD ["php-fpm"] + diff --git a/openshift/sample/mariadb-secret.yaml b/openshift/sample/1_mariadb-secret.yaml similarity index 100% rename from openshift/sample/mariadb-secret.yaml rename to openshift/sample/1_mariadb-secret.yaml diff --git a/openshift/sample/mariadb-cm.yaml b/openshift/sample/2_mariadb-cm.yaml similarity index 100% rename from openshift/sample/mariadb-cm.yaml rename to openshift/sample/2_mariadb-cm.yaml diff --git a/openshift/sample/mariadb-statefulset.yaml b/openshift/sample/3_mariadb-statefulset.yaml similarity index 100% rename from openshift/sample/mariadb-statefulset.yaml rename to openshift/sample/3_mariadb-statefulset.yaml diff --git a/openshift/sample/mariadb-svc.yaml b/openshift/sample/4_mariadb-svc.yaml similarity index 89% rename from openshift/sample/mariadb-svc.yaml rename to openshift/sample/4_mariadb-svc.yaml index 0003025..80e18ac 100644 --- a/openshift/sample/mariadb-svc.yaml +++ b/openshift/sample/4_mariadb-svc.yaml @@ -11,4 +11,4 @@ spec: - port: 3306 targetPort: 3306 selector: - app: mariadb + app: mariadb-sample diff --git a/openshift/sample/sample-app-cm.yaml b/openshift/sample/5_sample-app-cm.yaml similarity index 100% rename from openshift/sample/sample-app-cm.yaml rename to openshift/sample/5_sample-app-cm.yaml diff --git a/openshift/sample/sample-app.yaml b/openshift/sample/6_sample-app.yaml similarity index 100% rename from openshift/sample/sample-app.yaml rename to openshift/sample/6_sample-app.yaml diff --git a/openshift/sample/sample-ingress.yaml b/openshift/sample/7_sample-ingress.yaml similarity index 100% rename from openshift/sample/sample-ingress.yaml rename to openshift/sample/7_sample-ingress.yaml From c7de5ac78c374e97e1a602e14202e7c5db2afe69 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 13:43:15 +0200 Subject: [PATCH 19/78] WIP --- openshift/sample/5_sample-app-cm.yaml | 1 + openshift/sample/6_sample-app.yaml | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/openshift/sample/5_sample-app-cm.yaml b/openshift/sample/5_sample-app-cm.yaml index 100f765..1b8a1d6 100644 --- a/openshift/sample/5_sample-app-cm.yaml +++ b/openshift/sample/5_sample-app-cm.yaml @@ -8,6 +8,7 @@ data: database-host: mariadb-sample database-port-number: '3306' database-name: development + laravel-storage: /var/www/laravel/ # wordpress-enable-https: 'yes' # wordpress-enable-reverse-proxy: 'yes' # Change the following to your blog name, email, first name and last name \ No newline at end of file diff --git a/openshift/sample/6_sample-app.yaml b/openshift/sample/6_sample-app.yaml index a0df72b..6963bca 100644 --- a/openshift/sample/6_sample-app.yaml +++ b/openshift/sample/6_sample-app.yaml @@ -42,6 +42,11 @@ spec: configMapKeyRef: name: sample-config key: database-name + - name: LARAVEL_STORAGE_PATH + valueFrom: + configMapKeyRef: + name: sample-config + key: laravel-storage - name: LARAVEL_DATABASE_USER valueFrom: configMapKeyRef: From f5fa1c620d181f760217747635a1ea4c1a78eaff Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 13:51:12 +0200 Subject: [PATCH 20/78] WIP --- docker/backend.dockerfile | 2 +- openshift/sample/5_sample-app-cm.yaml | 2 +- openshift/sample/6_sample-app.yaml | 10 +++++----- openshift/sample/7_sample-ingress.yaml | 9 ++++++++- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/docker/backend.dockerfile b/docker/backend.dockerfile index 2f8a1b9..9fff760 100644 --- a/docker/backend.dockerfile +++ b/docker/backend.dockerfile @@ -41,7 +41,7 @@ RUN cd /usr/local/share/ca-certificates && update-ca-certificates COPY ./docker/docker.env /var/www/.env -RUN chmod a+w -R /var/www/storage +RUN chmod -R a+rw /var/www/storage RUN php artisan key:generate # entrypoint diff --git a/openshift/sample/5_sample-app-cm.yaml b/openshift/sample/5_sample-app-cm.yaml index 1b8a1d6..7ad0928 100644 --- a/openshift/sample/5_sample-app-cm.yaml +++ b/openshift/sample/5_sample-app-cm.yaml @@ -8,7 +8,7 @@ data: database-host: mariadb-sample database-port-number: '3306' database-name: development - laravel-storage: /var/www/laravel/ +# laravel-storage: /var/www/laravel/ # wordpress-enable-https: 'yes' # wordpress-enable-reverse-proxy: 'yes' # Change the following to your blog name, email, first name and last name \ No newline at end of file diff --git a/openshift/sample/6_sample-app.yaml b/openshift/sample/6_sample-app.yaml index 6963bca..02ff18d 100644 --- a/openshift/sample/6_sample-app.yaml +++ b/openshift/sample/6_sample-app.yaml @@ -42,11 +42,11 @@ spec: configMapKeyRef: name: sample-config key: database-name - - name: LARAVEL_STORAGE_PATH - valueFrom: - configMapKeyRef: - name: sample-config - key: laravel-storage +# - name: LARAVEL_STORAGE_PATH +# valueFrom: +# configMapKeyRef: +# name: sample-config +# key: laravel-storage - name: LARAVEL_DATABASE_USER valueFrom: configMapKeyRef: diff --git a/openshift/sample/7_sample-ingress.yaml b/openshift/sample/7_sample-ingress.yaml index aa5725a..1e4cf2f 100644 --- a/openshift/sample/7_sample-ingress.yaml +++ b/openshift/sample/7_sample-ingress.yaml @@ -2,7 +2,14 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: sample-ingress + namespace: uu-0219959 + annotations: + cert-manager.io/cluster-issuer: sectigo spec: + tls: + - hosts: + - app.openshift.fss.uu.nl + secretName: sample-app-tls rules: - host: app.openshift.fss.uu.nl # Replace with your desired hostname http: @@ -13,4 +20,4 @@ spec: service: name: sample-app port: - number: 80 + number: 8080 From aaa1df809ac2ef4f2cfe8de2c77ad85fa7e6610a Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 14:20:05 +0200 Subject: [PATCH 21/78] YEAH een werkende conntainer.... --- openshift/sample/7_sample-ingress.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openshift/sample/7_sample-ingress.yaml b/openshift/sample/7_sample-ingress.yaml index 1e4cf2f..f05c4d1 100644 --- a/openshift/sample/7_sample-ingress.yaml +++ b/openshift/sample/7_sample-ingress.yaml @@ -20,4 +20,4 @@ spec: service: name: sample-app port: - number: 8080 + number: 80 From 37633d2cbc10e129174e2af3b8580fcccd518ba3 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 15:37:28 +0200 Subject: [PATCH 22/78] Cleanup. --- README.md | 10 +++++ docker-compose.yml | 26 ++++++------- docker/backend-entrypoint.sh | 15 ++------ docker/backend.dockerfile | 4 -- docker/docker.env | 4 +- docker/frontend-entrypoint.sh | 6 +-- docker/mariadb.dockerfile | 8 ---- docker/nginx-entrypoint.sh | 10 ----- docker/vhost.conf | 2 +- openshift/openshift-entrypoint.sh | 13 +++++++ openshift/openshift.dockerfile | 53 +++++++++++++++++++++++++++ openshift/openshift.env | 59 ++++++++++++++++++++++++++++++ openshift/sample/6_sample-app.yaml | 1 - 13 files changed, 155 insertions(+), 56 deletions(-) delete mode 100644 docker/mariadb.dockerfile delete mode 100644 docker/nginx-entrypoint.sh create mode 100644 openshift/openshift-entrypoint.sh create mode 100644 openshift/openshift.dockerfile create mode 100644 openshift/openshift.env diff --git a/README.md b/README.md index 8e12e1e..d442926 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,13 @@ https://www.redhat.com/sysadmin/codeready-containers Soms wil hij niet starten, dan moet je de vm verwijderen en opnieuw starten: `crc cleanup` + + +### Local development: +Add the following to your /etc/hosts file: + +``` 127.0.0.1 openshift.docker.dev``` + +run the following command in the root of the project: + +```docker compose up -d --build``` diff --git a/docker-compose.yml b/docker-compose.yml index c3955cf..8ad394d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,8 +16,8 @@ services: container_name: openshift_frontend build: dockerfile: docker/frontend.dockerfile - args: - - APP_ENV=local + environment: + - APP_ENV=local volumes: - ./:/var/www/public working_dir: /var/www/public @@ -33,17 +33,15 @@ services: context: ./ dockerfile: docker/nginx.dockerfile environment: - - VIRTUAL_HOST=app.openshift.fss.uu.nl - - VIRTUAL_PROTO=http - - VIRTUAL_PORT=80 - - NGINX_HOST=app.openshift.fss.uu.nl - - NGINX_PORT=8080 + - VIRTUAL_HOST=openshift.docker.dev + - VIRTUAL_PROTO=http + - VIRTUAL_PORT=80 volumes: - - ./:/var/www - - ./storage/logs/:/var/log/nginx + - ./:/var/www + - ./storage/logs/:/var/log/nginx networks: - - default - - hts-appteam-local-dev + - default + - hts-appteam-local-dev mariadb: hostname: openshift_mariadb.docker.dev container_name: openshift_mariadb @@ -56,8 +54,8 @@ services: MYSQL_USER: "development" MYSQL_PASSWORD: "secret" networks: - - default - - hts-appteam-local-dev + - default + - hts-appteam-local-dev networks: hts-appteam-local-dev: - external: true + external: true \ No newline at end of file diff --git a/docker/backend-entrypoint.sh b/docker/backend-entrypoint.sh index a2608b1..ed4cdf1 100644 --- a/docker/backend-entrypoint.sh +++ b/docker/backend-entrypoint.sh @@ -1,16 +1,7 @@ #!/usr/bin/env bash echo " ⭐️️️️️⭐️️️️️⭐️️️️️⭐️ VERSIE: 1 " # run artisan migrate & seed -ls -la /var/www -#if [ "$APP_ENV" = "local" ]; then -# ## in de dockerfile worden de dev packages verwijderd, dus die moeten we eerst installeren -# php composer.phar install +echo "⭐️ Run artisan migrate"; +php artisan migrate --seed - echo "⭐️ Run artisan migrate"; - php artisan migrate --seed - -# echo "⭐️ generate key"; -# php artisan key:generate -#fi -php artisan serve --host=0.0.0.0 --port=8080 -php-fpm +php-fpm \ No newline at end of file diff --git a/docker/backend.dockerfile b/docker/backend.dockerfile index 9fff760..dc76807 100644 --- a/docker/backend.dockerfile +++ b/docker/backend.dockerfile @@ -50,10 +50,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"] - diff --git a/docker/docker.env b/docker/docker.env index 3c8a98e..698d740 100644 --- a/docker/docker.env +++ b/docker/docker.env @@ -2,14 +2,14 @@ APP_NAME=Openshift APP_ENV=acceptance APP_KEY= APP_DEBUG=true -APP_URL=https://app.openshift.fss.uu.nl/ +APP_URL=http://openshift.docker.dev LOG_CHANNEL=stack LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug DB_CONNECTION=mysql -DB_HOST=mariadb-sample +DB_HOST=mariadb DB_PORT=3306 DB_DATABASE=development DB_USERNAME=development diff --git a/docker/frontend-entrypoint.sh b/docker/frontend-entrypoint.sh index dad7df4..a1231a5 100644 --- a/docker/frontend-entrypoint.sh +++ b/docker/frontend-entrypoint.sh @@ -1,6 +1,4 @@ #!/usr/bin/env sh -if [ "$APP_ENV" = "local" ]; then - echo "⭐️ Start dev server" - npm run dev -fi +echo "⭐️ Start dev server" +npm run dev diff --git a/docker/mariadb.dockerfile b/docker/mariadb.dockerfile deleted file mode 100644 index 80f17ea..0000000 --- a/docker/mariadb.dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM mariadb:latest - -# entrypoint -COPY ./docker/frontend-entrypoint.sh /frontend-entrypoint.sh -RUN chmod ugo+x /frontend-entrypoint.sh -RUN dos2unix /frontend-entrypoint.sh - -ENTRYPOINT /frontend-entrypoint.sh diff --git a/docker/nginx-entrypoint.sh b/docker/nginx-entrypoint.sh deleted file mode 100644 index ee5b699..0000000 --- a/docker/nginx-entrypoint.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env sh - -NOT USED FOR NOW -#echo " ⭐️️️️️copy conf file" -#ls -la -##if [ "$APP_ENV" = "local" ]; then -## cp /var/www/docker/vhost.conf /etc/nginx/conf.d/default.conf -##fi -#systemctl status nginx -#systemctl start nginx diff --git a/docker/vhost.conf b/docker/vhost.conf index 555b965..559435a 100644 --- a/docker/vhost.conf +++ b/docker/vhost.conf @@ -17,4 +17,4 @@ server { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; } -} +} \ No newline at end of file diff --git a/openshift/openshift-entrypoint.sh b/openshift/openshift-entrypoint.sh new file mode 100644 index 0000000..d9365e0 --- /dev/null +++ b/openshift/openshift-entrypoint.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +echo " ⭐️️️️️⭐️️️️️⭐️️️️️⭐️ VERSIE: 1 " +# run artisan migrate & seed +echo "⭐️ Run artisan migrate"; +php artisan migrate --seed + + +composer install --no-dev --no-scripts + +npm run build + +php artisan serve --host=0.0.0.0 --port=8080 +php-fpm diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile new file mode 100644 index 0000000..aaf888b --- /dev/null +++ b/openshift/openshift.dockerfile @@ -0,0 +1,53 @@ +FROM php:8.2-fpm + +COPY composer.lock composer.json /var/www/ +# set workdir +WORKDIR /var/www + +# upgrades! +RUN apt-get update +RUN apt-get -y dist-upgrade +RUN apt-get install -y zip + +RUN apt-get install -y sudo nano + +# install additional PHP extensions +RUN apt-get 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 clean -y + +# set corrent TimeZone +ENV TZ=Europe/Amsterdam +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +# copy webapp files +COPY .. /var/www + +# install composer +RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer +# run composer + +RUN composer install + +COPY ./docker/openshift.env /var/www/.env + +RUN chmod -R a+rw /var/www/storage +RUN php artisan key:generate + +# entrypoint +COPY ./docker/backend-entrypoint.sh /entrypoint.sh +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"] + diff --git a/openshift/openshift.env b/openshift/openshift.env new file mode 100644 index 0000000..3c8a98e --- /dev/null +++ b/openshift/openshift.env @@ -0,0 +1,59 @@ +APP_NAME=Openshift +APP_ENV=acceptance +APP_KEY= +APP_DEBUG=true +APP_URL=https://app.openshift.fss.uu.nl/ + +LOG_CHANNEL=stack +LOG_DEPRECATIONS_CHANNEL=null +LOG_LEVEL=debug + +DB_CONNECTION=mysql +DB_HOST=mariadb-sample +DB_PORT=3306 +DB_DATABASE=development +DB_USERNAME=development +DB_PASSWORD=secret + +BROADCAST_DRIVER=log +CACHE_DRIVER=file +FILESYSTEM_DISK=local +QUEUE_CONNECTION=sync +SESSION_DRIVER=file +SESSION_LIFETIME=120 + +MEMCACHED_HOST=127.0.0.1 + +REDIS_HOST=127.0.0.1 +REDIS_PASSWORD=null +REDIS_PORT=6379 + +MAIL_MAILER=smtp +MAIL_HOST=mailpit +MAIL_PORT=1025 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_ENCRYPTION=null +MAIL_FROM_ADDRESS="hello@example.com" +MAIL_FROM_NAME="${APP_NAME}" + +AWS_ACCESS_KEY_ID= +AWS_SECRET_ACCESS_KEY= +AWS_DEFAULT_REGION=us-east-1 +AWS_BUCKET= +AWS_USE_PATH_STYLE_ENDPOINT=false + +PUSHER_APP_ID= +PUSHER_APP_KEY= +PUSHER_APP_SECRET= +PUSHER_HOST= +PUSHER_PORT=443 +PUSHER_SCHEME=https +PUSHER_APP_CLUSTER=mt1 + +VITE_APP_NAME="${APP_NAME}" +VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}" +VITE_PUSHER_HOST="${PUSHER_HOST}" +VITE_PUSHER_PORT="${PUSHER_PORT}" +VITE_PUSHER_SCHEME="${PUSHER_SCHEME}" +VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" diff --git a/openshift/sample/6_sample-app.yaml b/openshift/sample/6_sample-app.yaml index 02ff18d..8281098 100644 --- a/openshift/sample/6_sample-app.yaml +++ b/openshift/sample/6_sample-app.yaml @@ -18,7 +18,6 @@ spec: containers: - name: sample-app image: ghcr.io/utrechtuniversity/fsw-openshift:latest -# image: bitnami/laravel:latest ports: - containerPort: 8080 env: From d4972e645e47f138f67031867e16d8085fc894e8 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 16:23:47 +0200 Subject: [PATCH 23/78] Use nginx on openshift. --- .github/workflows/docker-image-Laravel.yml | 44 ++++++++++++++++++++++ .github/workflows/docker-image-Nginx.yml | 44 ++++++++++++++++++++++ .github/workflows/docker-image.yml | 18 --------- openshift/nginx.dockerfile | 8 ++++ openshift/openshift-entrypoint.sh | 2 +- openshift/sample/7_nginx.yaml | 19 ++++++++++ openshift/vhost.conf | 20 ++++++++++ 7 files changed, 136 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/docker-image-Laravel.yml create mode 100644 .github/workflows/docker-image-Nginx.yml delete mode 100644 .github/workflows/docker-image.yml create mode 100644 openshift/nginx.dockerfile create mode 100644 openshift/sample/7_nginx.yaml create mode 100644 openshift/vhost.conf diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml new file mode 100644 index 0000000..a39bd62 --- /dev/null +++ b/.github/workflows/docker-image-Laravel.yml @@ -0,0 +1,44 @@ +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 }} + + +on: + push: + branches: [ "master" "develop" ] + pull_request: + branches: [ "master" ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build the Docker image + id: build-image + uses: redhat-actions/buildah-build@v2 + with: + image: Laravel + tags: ${{ env.IMAGE_TAGS }} + + # If you don't have a Dockerfile/Containerfile, refer to https://github.com/redhat-actions/buildah-build#scratch-build-inputs + # Or, perform a source-to-image build using https://github.com/redhat-actions/s2i-build + # Otherwise, point this to your Dockerfile/Containerfile relative to the repository root. + 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 diff --git a/.github/workflows/docker-image-Nginx.yml b/.github/workflows/docker-image-Nginx.yml new file mode 100644 index 0000000..98b6b36 --- /dev/null +++ b/.github/workflows/docker-image-Nginx.yml @@ -0,0 +1,44 @@ +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 }} + + +on: + push: + branches: [ "master" "develop" ] + pull_request: + branches: [ "master" ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build the Docker image + id: build-image + uses: redhat-actions/buildah-build@v2 + with: + image: Nginx + tags: ${{ env.IMAGE_TAGS }} + + # If you don't have a Dockerfile/Containerfile, refer to https://github.com/redhat-actions/buildah-build#scratch-build-inputs + # Or, perform a source-to-image build using https://github.com/redhat-actions/s2i-build + # Otherwise, point this to your Dockerfile/Containerfile relative to the repository root. + dockerfiles: | + ./openshift/nginx.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 diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml deleted file mode 100644 index ba997dc..0000000 --- a/.github/workflows/docker-image.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Docker Image CI - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -jobs: - - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Build the Docker image - run: docker build . --file docker/backend.dockerfile --tag my-image-name:$(date +%s) diff --git a/openshift/nginx.dockerfile b/openshift/nginx.dockerfile new file mode 100644 index 0000000..28f7d16 --- /dev/null +++ b/openshift/nginx.dockerfile @@ -0,0 +1,8 @@ +FROM nginxinc/nginx-unprivileged:stable-alpine + +ADD ./openshift/vhost.conf /etc/nginx/conf.d/default.conf + + +# Expose port 8443 and start php-fpm server +EXPOSE 8080 +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/openshift/openshift-entrypoint.sh b/openshift/openshift-entrypoint.sh index d9365e0..03db54e 100644 --- a/openshift/openshift-entrypoint.sh +++ b/openshift/openshift-entrypoint.sh @@ -9,5 +9,5 @@ composer install --no-dev --no-scripts npm run build -php artisan serve --host=0.0.0.0 --port=8080 +#php artisan serve --host=0.0.0.0 --port=8080 php-fpm diff --git a/openshift/sample/7_nginx.yaml b/openshift/sample/7_nginx.yaml new file mode 100644 index 0000000..8e109d5 --- /dev/null +++ b/openshift/sample/7_nginx.yaml @@ -0,0 +1,19 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx +spec: + replicas: 1 + selector: + matchLabels: + app: nginx + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: ghcr.io/utrechtuniversity/openshift-nginx:latest + ports: + - containerPort: 8080 \ No newline at end of file diff --git a/openshift/vhost.conf b/openshift/vhost.conf new file mode 100644 index 0000000..8f612a5 --- /dev/null +++ b/openshift/vhost.conf @@ -0,0 +1,20 @@ +server { + listen 80; + server_name app.openshift.fss.uu.nl; + index index.php index.html; + root /var/www/public; + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; + location / { + try_files $uri /index.php?$args; + } + + location ~ \.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass backend:9000; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PATH_INFO $fastcgi_path_info; + } +} \ No newline at end of file From a00b90047287365e55d3de273379583864e5f444 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 16:26:41 +0200 Subject: [PATCH 24/78] syntax error. --- .github/workflows/docker-image-Laravel.yml | 4 +--- .github/workflows/docker-image-Nginx.yml | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index a39bd62..0519daf 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -5,11 +5,9 @@ env: IMAGE_REGISTRY: ghcr.io/utrechtuniversity IMAGE_REGISTRY_USER: ${{ github.actor }} IMAGE_REGISTRY_PASSWORD: ${{ github.token }} - - on: push: - branches: [ "master" "develop" ] + branches: [ "master", "develop" ] pull_request: branches: [ "master" ] diff --git a/.github/workflows/docker-image-Nginx.yml b/.github/workflows/docker-image-Nginx.yml index 98b6b36..589fbde 100644 --- a/.github/workflows/docker-image-Nginx.yml +++ b/.github/workflows/docker-image-Nginx.yml @@ -5,11 +5,9 @@ env: IMAGE_REGISTRY: ghcr.io/utrechtuniversity IMAGE_REGISTRY_USER: ${{ github.actor }} IMAGE_REGISTRY_PASSWORD: ${{ github.token }} - - on: push: - branches: [ "master" "develop" ] + branches: [ "master", "develop" ] pull_request: branches: [ "master" ] From 7878b41ba7d75558fadaa1cc76158741689cd5c9 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 16:29:07 +0200 Subject: [PATCH 25/78] Testing. --- .github/workflows/docker-image-Laravel.yml | 2 +- .github/workflows/docker-image-Nginx.yml | 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 0519daf..d92258e 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -7,7 +7,7 @@ env: IMAGE_REGISTRY_PASSWORD: ${{ github.token }} on: push: - branches: [ "master", "develop" ] + branches: [ "master", "develop", "feature/da_opschonen"] pull_request: branches: [ "master" ] diff --git a/.github/workflows/docker-image-Nginx.yml b/.github/workflows/docker-image-Nginx.yml index 589fbde..626b1f6 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" ] + branches: [ "master", "develop", "feature/da_opschonen" ] pull_request: branches: [ "master" ] From b729be25683db812e198c78bd1af9ef01d8bb78f Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 16:30:31 +0200 Subject: [PATCH 26/78] Correct tittle. --- .github/workflows/docker-image-Nginx.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image-Nginx.yml b/.github/workflows/docker-image-Nginx.yml index 626b1f6..affab86 100644 --- a/.github/workflows/docker-image-Nginx.yml +++ b/.github/workflows/docker-image-Nginx.yml @@ -1,4 +1,4 @@ -name: Docker Image Laravel +name: Docker Image Nginx env: # 🖊️ EDIT to change the image registry settings. # Registries such as GHCR, Quay.io, and Docker Hub are supported. From 654fcf0f2abe08920604e440a6a8f146d5d95b79 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 16:32:57 +0200 Subject: [PATCH 27/78] Testing. --- .github/workflows/docker-image-Laravel.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index d92258e..3f76299 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -12,19 +12,16 @@ on: branches: [ "master" ] jobs: - build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - - name: Build the Docker image + - name: Build from Dockerfile id: build-image uses: redhat-actions/buildah-build@v2 with: image: Laravel - tags: ${{ env.IMAGE_TAGS }} + tags: latest # If you don't have a Dockerfile/Containerfile, refer to https://github.com/redhat-actions/buildah-build#scratch-build-inputs # Or, perform a source-to-image build using https://github.com/redhat-actions/s2i-build From 3811a908dc01b7bdb8ae5de097a587d49f973310 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 16:36:18 +0200 Subject: [PATCH 28/78] Testing. --- .github/workflows/docker-image-Laravel.yml | 4 ---- .github/workflows/docker-image-Nginx.yml | 10 +--------- openshift/openshift.dockerfile | 2 +- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 3f76299..7b93a89 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -22,10 +22,6 @@ jobs: with: image: Laravel tags: latest - - # If you don't have a Dockerfile/Containerfile, refer to https://github.com/redhat-actions/buildah-build#scratch-build-inputs - # Or, perform a source-to-image build using https://github.com/redhat-actions/s2i-build - # Otherwise, point this to your Dockerfile/Containerfile relative to the repository root. dockerfiles: | ./openshift/openshift.dockerfile - name: Push to registry diff --git a/.github/workflows/docker-image-Nginx.yml b/.github/workflows/docker-image-Nginx.yml index affab86..f6cfed7 100644 --- a/.github/workflows/docker-image-Nginx.yml +++ b/.github/workflows/docker-image-Nginx.yml @@ -10,13 +10,9 @@ on: branches: [ "master", "develop", "feature/da_opschonen" ] pull_request: branches: [ "master" ] - jobs: - build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - name: Build the Docker image @@ -24,11 +20,7 @@ jobs: uses: redhat-actions/buildah-build@v2 with: image: Nginx - tags: ${{ env.IMAGE_TAGS }} - - # If you don't have a Dockerfile/Containerfile, refer to https://github.com/redhat-actions/buildah-build#scratch-build-inputs - # Or, perform a source-to-image build using https://github.com/redhat-actions/s2i-build - # Otherwise, point this to your Dockerfile/Containerfile relative to the repository root. + tags: latest dockerfiles: | ./openshift/nginx.dockerfile - name: Push to registry diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index aaf888b..c71e690 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -33,7 +33,7 @@ RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/lo RUN composer install -COPY ./docker/openshift.env /var/www/.env +COPY ./openshift/openshift.env /var/www/.env RUN chmod -R a+rw /var/www/storage RUN php artisan key:generate From a3a9f7795899f343b22cee2cc16e96f6e951d1df Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 16:44:12 +0200 Subject: [PATCH 29/78] Testing. --- .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 7b93a89..4b02441 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -10,7 +10,6 @@ on: branches: [ "master", "develop", "feature/da_opschonen"] pull_request: branches: [ "master" ] - jobs: build: runs-on: ubuntu-latest @@ -20,7 +19,7 @@ jobs: id: build-image uses: redhat-actions/buildah-build@v2 with: - image: Laravel + image: fsw-openshift tags: latest dockerfiles: | ./openshift/openshift.dockerfile From 74313cdb5cb03ca076fe44f4db4f384948679f12 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 16:59:59 +0200 Subject: [PATCH 30/78] Testing. --- openshift/openshift.dockerfile | 2 +- openshift/sample/7_nginx.yaml | 5 ++++- .../sample/{7_sample-ingress.yaml => 8_sample-ingress.yaml} | 2 +- openshift/vhost.conf | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) rename openshift/sample/{7_sample-ingress.yaml => 8_sample-ingress.yaml} (93%) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index c71e690..4ca2ff0 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -39,7 +39,7 @@ RUN chmod -R a+rw /var/www/storage RUN php artisan key:generate # entrypoint -COPY ./docker/backend-entrypoint.sh /entrypoint.sh +COPY ./openshift/openshift-entrypoint.sh /entrypoint.sh RUN chmod ugo+x /entrypoint.sh RUN php artisan optimize diff --git a/openshift/sample/7_nginx.yaml b/openshift/sample/7_nginx.yaml index 8e109d5..2fa2176 100644 --- a/openshift/sample/7_nginx.yaml +++ b/openshift/sample/7_nginx.yaml @@ -2,6 +2,9 @@ apiVersion: apps/v1 kind: Deployment metadata: name: nginx + labels: + app: fsw-nginx + app.kubernetes.io/part-of: fsw-sample-app spec: replicas: 1 selector: @@ -14,6 +17,6 @@ spec: spec: containers: - name: nginx - image: ghcr.io/utrechtuniversity/openshift-nginx:latest + image: ghcr.io/utrechtuniversity/nginx:latest ports: - containerPort: 8080 \ No newline at end of file diff --git a/openshift/sample/7_sample-ingress.yaml b/openshift/sample/8_sample-ingress.yaml similarity index 93% rename from openshift/sample/7_sample-ingress.yaml rename to openshift/sample/8_sample-ingress.yaml index f05c4d1..e35f371 100644 --- a/openshift/sample/7_sample-ingress.yaml +++ b/openshift/sample/8_sample-ingress.yaml @@ -18,6 +18,6 @@ spec: pathType: Prefix backend: service: - name: sample-app + name: nginx port: number: 80 diff --git a/openshift/vhost.conf b/openshift/vhost.conf index 8f612a5..079cedb 100644 --- a/openshift/vhost.conf +++ b/openshift/vhost.conf @@ -11,7 +11,7 @@ server { location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass backend:9000; + fastcgi_pass sample-app:80; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; From f57127d04185592e3c74a6c7dccee0b4845e57af Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 17:00:12 +0200 Subject: [PATCH 31/78] Testing. --- openshift/nginx.dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/openshift/nginx.dockerfile b/openshift/nginx.dockerfile index 28f7d16..e07e3cb 100644 --- a/openshift/nginx.dockerfile +++ b/openshift/nginx.dockerfile @@ -5,4 +5,15 @@ ADD ./openshift/vhost.conf /etc/nginx/conf.d/default.conf # Expose port 8443 and start php-fpm server EXPOSE 8080 +# entrypoint +COPY ./docker/backend-entrypoint.sh /entrypoint.sh +RUN chmod ugo+x /entrypoint.sh + +RUN php artisan optimize + +# Expose port 8443 and start php-fpm server +EXPOSE 8080 + +ENTRYPOINT /entrypoint.sh + CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file From a2f133072c06200e142459ae4783fcf1d7125b9e Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 17:12:29 +0200 Subject: [PATCH 32/78] Testing. --- openshift/openshift-entrypoint.sh | 3 --- openshift/vhost.conf | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/openshift/openshift-entrypoint.sh b/openshift/openshift-entrypoint.sh index 03db54e..d3614d7 100644 --- a/openshift/openshift-entrypoint.sh +++ b/openshift/openshift-entrypoint.sh @@ -3,10 +3,7 @@ echo " ⭐️️️️️⭐️️️️️⭐️️️️️⭐️ VERSIE: 1 " # run artisan migrate & seed echo "⭐️ Run artisan migrate"; php artisan migrate --seed - - composer install --no-dev --no-scripts - npm run build #php artisan serve --host=0.0.0.0 --port=8080 diff --git a/openshift/vhost.conf b/openshift/vhost.conf index 079cedb..ad333df 100644 --- a/openshift/vhost.conf +++ b/openshift/vhost.conf @@ -1,5 +1,5 @@ server { - listen 80; + listen 8080; server_name app.openshift.fss.uu.nl; index index.php index.html; root /var/www/public; From 9316834c61f6e30019da750fcb82b745a8159e3c Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 17:14:35 +0200 Subject: [PATCH 33/78] Testing. --- openshift/nginx.dockerfile | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/openshift/nginx.dockerfile b/openshift/nginx.dockerfile index e07e3cb..12c65e7 100644 --- a/openshift/nginx.dockerfile +++ b/openshift/nginx.dockerfile @@ -2,18 +2,7 @@ FROM nginxinc/nginx-unprivileged:stable-alpine ADD ./openshift/vhost.conf /etc/nginx/conf.d/default.conf - -# Expose port 8443 and start php-fpm server -EXPOSE 8080 -# entrypoint -COPY ./docker/backend-entrypoint.sh /entrypoint.sh -RUN chmod ugo+x /entrypoint.sh - -RUN php artisan optimize - # Expose port 8443 and start php-fpm server EXPOSE 8080 -ENTRYPOINT /entrypoint.sh - -CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file +#CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file From c7c79e6cb2182e09294712e3777fd60e7f5e9141 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 17:26:04 +0200 Subject: [PATCH 34/78] Testing. --- openshift/sample/6_sample-app.yaml | 2 +- openshift/sample/8_nginx-svc.yaml | 14 ++++++++++++++ ...8_sample-ingress.yaml => 9_sample-ingress.yaml} | 2 +- openshift/vhost.conf | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 openshift/sample/8_nginx-svc.yaml rename openshift/sample/{8_sample-ingress.yaml => 9_sample-ingress.yaml} (94%) diff --git a/openshift/sample/6_sample-app.yaml b/openshift/sample/6_sample-app.yaml index 8281098..da0017a 100644 --- a/openshift/sample/6_sample-app.yaml +++ b/openshift/sample/6_sample-app.yaml @@ -69,6 +69,6 @@ spec: app: fsw-sample-app ports: - protocol: TCP - port: 80 + port: 8080 targetPort: 8080 --- diff --git a/openshift/sample/8_nginx-svc.yaml b/openshift/sample/8_nginx-svc.yaml new file mode 100644 index 0000000..0457b3e --- /dev/null +++ b/openshift/sample/8_nginx-svc.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: nginx + labels: + app: fsw-sample-app + app.kubernetes.io/part-of: fsw-sample-app +spec: + selector: + app: nginx + ports: + - protocol: TCP + port: 8080 + targetPort: 8080 \ No newline at end of file diff --git a/openshift/sample/8_sample-ingress.yaml b/openshift/sample/9_sample-ingress.yaml similarity index 94% rename from openshift/sample/8_sample-ingress.yaml rename to openshift/sample/9_sample-ingress.yaml index e35f371..1a8d9ee 100644 --- a/openshift/sample/8_sample-ingress.yaml +++ b/openshift/sample/9_sample-ingress.yaml @@ -20,4 +20,4 @@ spec: service: name: nginx port: - number: 80 + number: 8080 diff --git a/openshift/vhost.conf b/openshift/vhost.conf index ad333df..0d2bfbc 100644 --- a/openshift/vhost.conf +++ b/openshift/vhost.conf @@ -11,7 +11,7 @@ server { location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass sample-app:80; + fastcgi_pass sample-app:8080; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; From d5d7e0ba591eac690d2d004516f71c1e4d9e2238 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 21 Jun 2024 17:37:09 +0200 Subject: [PATCH 35/78] Testing. --- openshift/openshift-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openshift/openshift-entrypoint.sh b/openshift/openshift-entrypoint.sh index d3614d7..e285b8d 100644 --- a/openshift/openshift-entrypoint.sh +++ b/openshift/openshift-entrypoint.sh @@ -3,7 +3,7 @@ echo " ⭐️️️️️⭐️️️️️⭐️️️️️⭐️ VERSIE: 1 " # run artisan migrate & seed echo "⭐️ Run artisan migrate"; php artisan migrate --seed -composer install --no-dev --no-scripts +##composer install --no-dev --no-scripts npm run build #php artisan serve --host=0.0.0.0 --port=8080 From c678d74fe8214b920066f813e973187fc931e0d0 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 24 Jun 2024 10:34:22 +0200 Subject: [PATCH 36/78] testing port numbers. --- .github/workflows/openshift.yml | 2 +- openshift/sample/6_sample-app.yaml | 18 +----------------- openshift/sample/7_sample-svc.yaml | 13 +++++++++++++ .../sample/{7_nginx.yaml => 8_nginx.yaml} | 0 .../{8_nginx-svc.yaml => 9_nginx-svc.yaml} | 2 +- ...ple-ingress.yaml => ZZ_sample-ingress.yaml} | 0 openshift/vhost.conf | 4 ++-- 7 files changed, 18 insertions(+), 21 deletions(-) create mode 100644 openshift/sample/7_sample-svc.yaml rename openshift/sample/{7_nginx.yaml => 8_nginx.yaml} (100%) rename openshift/sample/{8_nginx-svc.yaml => 9_nginx-svc.yaml} (90%) rename openshift/sample/{9_sample-ingress.yaml => ZZ_sample-ingress.yaml} (100%) diff --git a/.github/workflows/openshift.yml b/.github/workflows/openshift.yml index 455cec1..b64ebd1 100644 --- a/.github/workflows/openshift.yml +++ b/.github/workflows/openshift.yml @@ -148,7 +148,7 @@ jobs: # Or, perform a source-to-image build using https://github.com/redhat-actions/s2i-build # Otherwise, point this to your Dockerfile/Containerfile relative to the repository root. dockerfiles: | - ./docker/backend.dockerfile + ./openshift/openshift.dockerfile # https://github.com/redhat-actions/push-to-registry#readme - name: Push to registry diff --git a/openshift/sample/6_sample-app.yaml b/openshift/sample/6_sample-app.yaml index da0017a..d753e28 100644 --- a/openshift/sample/6_sample-app.yaml +++ b/openshift/sample/6_sample-app.yaml @@ -19,7 +19,7 @@ spec: - name: sample-app image: ghcr.io/utrechtuniversity/fsw-openshift:latest ports: - - containerPort: 8080 + - containerPort: 9000 env: - name: LARAVEL_DATABASE_TYPE valueFrom: @@ -56,19 +56,3 @@ spec: secretKeyRef: name: mariadb-secret key: mariadb-password ---- -apiVersion: v1 -kind: Service -metadata: - name: fsw-sample-app - labels: - app: fsw-sample-app - app.kubernetes.io/part-of: fsw-sample-app -spec: - selector: - app: fsw-sample-app - ports: - - protocol: TCP - port: 8080 - targetPort: 8080 ---- diff --git a/openshift/sample/7_sample-svc.yaml b/openshift/sample/7_sample-svc.yaml new file mode 100644 index 0000000..ef19045 --- /dev/null +++ b/openshift/sample/7_sample-svc.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: fsw-sample-app + labels: + app: fsw-sample-app + app.kubernetes.io/part-of: fsw-sample-app +spec: + selector: + app: fsw-sample-app + ports: + - port: 9000 + targetPort: 9000 diff --git a/openshift/sample/7_nginx.yaml b/openshift/sample/8_nginx.yaml similarity index 100% rename from openshift/sample/7_nginx.yaml rename to openshift/sample/8_nginx.yaml diff --git a/openshift/sample/8_nginx-svc.yaml b/openshift/sample/9_nginx-svc.yaml similarity index 90% rename from openshift/sample/8_nginx-svc.yaml rename to openshift/sample/9_nginx-svc.yaml index 0457b3e..8afc60a 100644 --- a/openshift/sample/8_nginx-svc.yaml +++ b/openshift/sample/9_nginx-svc.yaml @@ -11,4 +11,4 @@ spec: ports: - protocol: TCP port: 8080 - targetPort: 8080 \ No newline at end of file + targetPort: 80 \ No newline at end of file diff --git a/openshift/sample/9_sample-ingress.yaml b/openshift/sample/ZZ_sample-ingress.yaml similarity index 100% rename from openshift/sample/9_sample-ingress.yaml rename to openshift/sample/ZZ_sample-ingress.yaml diff --git a/openshift/vhost.conf b/openshift/vhost.conf index 0d2bfbc..87b4697 100644 --- a/openshift/vhost.conf +++ b/openshift/vhost.conf @@ -1,5 +1,5 @@ server { - listen 8080; + listen 80; server_name app.openshift.fss.uu.nl; index index.php index.html; root /var/www/public; @@ -11,7 +11,7 @@ server { location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass sample-app:8080; + fastcgi_pass sample-app:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; From 4f0873affbeeaea91dd092b5ffd51b067b431988 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 24 Jun 2024 10:43:10 +0200 Subject: [PATCH 37/78] testing port numbers. --- openshift/sample/4_mariadb-svc.yaml | 1 - openshift/sample/7_sample-svc.yaml | 6 +++--- openshift/sample/9_nginx-svc.yaml | 2 +- openshift/vhost.conf | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/openshift/sample/4_mariadb-svc.yaml b/openshift/sample/4_mariadb-svc.yaml index 80e18ac..e6bac8f 100644 --- a/openshift/sample/4_mariadb-svc.yaml +++ b/openshift/sample/4_mariadb-svc.yaml @@ -1,4 +1,3 @@ ---- apiVersion: v1 kind: Service metadata: diff --git a/openshift/sample/7_sample-svc.yaml b/openshift/sample/7_sample-svc.yaml index ef19045..b1a686f 100644 --- a/openshift/sample/7_sample-svc.yaml +++ b/openshift/sample/7_sample-svc.yaml @@ -1,13 +1,13 @@ apiVersion: v1 kind: Service metadata: - name: fsw-sample-app + name: sample-app labels: app: fsw-sample-app app.kubernetes.io/part-of: fsw-sample-app spec: - selector: - app: fsw-sample-app ports: - port: 9000 targetPort: 9000 + selector: + app: sample-app diff --git a/openshift/sample/9_nginx-svc.yaml b/openshift/sample/9_nginx-svc.yaml index 8afc60a..0457b3e 100644 --- a/openshift/sample/9_nginx-svc.yaml +++ b/openshift/sample/9_nginx-svc.yaml @@ -11,4 +11,4 @@ spec: ports: - protocol: TCP port: 8080 - targetPort: 80 \ No newline at end of file + targetPort: 8080 \ No newline at end of file diff --git a/openshift/vhost.conf b/openshift/vhost.conf index 87b4697..89f7c6e 100644 --- a/openshift/vhost.conf +++ b/openshift/vhost.conf @@ -1,5 +1,5 @@ server { - listen 80; + listen 8080; server_name app.openshift.fss.uu.nl; index index.php index.html; root /var/www/public; From ea68a2aa23008658303ddab50037092abab64d81 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 24 Jun 2024 11:28:47 +0200 Subject: [PATCH 38/78] testing port numbers. --- .../01_mariadb-secret.yaml} | 4 ++-- .../02_mariadb-cm.yaml} | 4 ++-- .../03_mariadb-statefulset.yaml} | 0 .../04_mariadb-svc.yaml} | 0 openshift/config/05_sample-app-cm.yaml | 10 ++++++++++ .../06_sample-app.yaml} | 5 ----- .../07_sample-svc.yaml} | 0 .../{sample/8_nginx.yaml => config/08_nginx.yaml} | 0 .../9_nginx-svc.yaml => config/09_nginx-svc.yaml} | 0 .../10_sample-ingress.yaml} | 0 openshift/sample/5_sample-app-cm.yaml | 14 -------------- openshift/scripts/sample-app.sh | 6 +++--- 12 files changed, 17 insertions(+), 26 deletions(-) rename openshift/{sample/1_mariadb-secret.yaml => config/01_mariadb-secret.yaml} (69%) rename openshift/{sample/2_mariadb-cm.yaml => config/02_mariadb-cm.yaml} (50%) rename openshift/{sample/3_mariadb-statefulset.yaml => config/03_mariadb-statefulset.yaml} (100%) rename openshift/{sample/4_mariadb-svc.yaml => config/04_mariadb-svc.yaml} (100%) create mode 100644 openshift/config/05_sample-app-cm.yaml rename openshift/{sample/6_sample-app.yaml => config/06_sample-app.yaml} (89%) rename openshift/{sample/7_sample-svc.yaml => config/07_sample-svc.yaml} (100%) rename openshift/{sample/8_nginx.yaml => config/08_nginx.yaml} (100%) rename openshift/{sample/9_nginx-svc.yaml => config/09_nginx-svc.yaml} (100%) rename openshift/{sample/ZZ_sample-ingress.yaml => config/10_sample-ingress.yaml} (100%) delete mode 100644 openshift/sample/5_sample-app-cm.yaml diff --git a/openshift/sample/1_mariadb-secret.yaml b/openshift/config/01_mariadb-secret.yaml similarity index 69% rename from openshift/sample/1_mariadb-secret.yaml rename to openshift/config/01_mariadb-secret.yaml index abe9f6d..01f4870 100644 --- a/openshift/sample/1_mariadb-secret.yaml +++ b/openshift/config/01_mariadb-secret.yaml @@ -7,5 +7,5 @@ type: Opaque data: # Use the following command to generate a random password: # echo -n 'ChangeThisSuperSecretPassword' | base64 - mariadb-root-password: c2VjcmV0 - mariadb-password: c2VjcmV0 + mariadb-root-password: + mariadb-password: diff --git a/openshift/sample/2_mariadb-cm.yaml b/openshift/config/02_mariadb-cm.yaml similarity index 50% rename from openshift/sample/2_mariadb-cm.yaml rename to openshift/config/02_mariadb-cm.yaml index 812d7e4..0ec1bed 100644 --- a/openshift/sample/2_mariadb-cm.yaml +++ b/openshift/config/02_mariadb-cm.yaml @@ -4,5 +4,5 @@ kind: ConfigMap metadata: name: mariadb-config data: - mariadb-database: development - mariadb-user: development + mariadb-database: sample-database + mariadb-user: sample-database-user diff --git a/openshift/sample/3_mariadb-statefulset.yaml b/openshift/config/03_mariadb-statefulset.yaml similarity index 100% rename from openshift/sample/3_mariadb-statefulset.yaml rename to openshift/config/03_mariadb-statefulset.yaml diff --git a/openshift/sample/4_mariadb-svc.yaml b/openshift/config/04_mariadb-svc.yaml similarity index 100% rename from openshift/sample/4_mariadb-svc.yaml rename to openshift/config/04_mariadb-svc.yaml diff --git a/openshift/config/05_sample-app-cm.yaml b/openshift/config/05_sample-app-cm.yaml new file mode 100644 index 0000000..7356fb7 --- /dev/null +++ b/openshift/config/05_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/sample/6_sample-app.yaml b/openshift/config/06_sample-app.yaml similarity index 89% rename from openshift/sample/6_sample-app.yaml rename to openshift/config/06_sample-app.yaml index d753e28..752ede0 100644 --- a/openshift/sample/6_sample-app.yaml +++ b/openshift/config/06_sample-app.yaml @@ -41,11 +41,6 @@ spec: configMapKeyRef: name: sample-config key: database-name -# - name: LARAVEL_STORAGE_PATH -# valueFrom: -# configMapKeyRef: -# name: sample-config -# key: laravel-storage - name: LARAVEL_DATABASE_USER valueFrom: configMapKeyRef: diff --git a/openshift/sample/7_sample-svc.yaml b/openshift/config/07_sample-svc.yaml similarity index 100% rename from openshift/sample/7_sample-svc.yaml rename to openshift/config/07_sample-svc.yaml diff --git a/openshift/sample/8_nginx.yaml b/openshift/config/08_nginx.yaml similarity index 100% rename from openshift/sample/8_nginx.yaml rename to openshift/config/08_nginx.yaml diff --git a/openshift/sample/9_nginx-svc.yaml b/openshift/config/09_nginx-svc.yaml similarity index 100% rename from openshift/sample/9_nginx-svc.yaml rename to openshift/config/09_nginx-svc.yaml diff --git a/openshift/sample/ZZ_sample-ingress.yaml b/openshift/config/10_sample-ingress.yaml similarity index 100% rename from openshift/sample/ZZ_sample-ingress.yaml rename to openshift/config/10_sample-ingress.yaml diff --git a/openshift/sample/5_sample-app-cm.yaml b/openshift/sample/5_sample-app-cm.yaml deleted file mode 100644 index 7ad0928..0000000 --- a/openshift/sample/5_sample-app-cm.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: sample-config -data: - database-type: mysql - database-host: mariadb-sample - database-port-number: '3306' - database-name: development -# laravel-storage: /var/www/laravel/ -# wordpress-enable-https: 'yes' -# wordpress-enable-reverse-proxy: 'yes' - # Change the following to your blog name, email, first name and last name \ No newline at end of file diff --git a/openshift/scripts/sample-app.sh b/openshift/scripts/sample-app.sh index 1ac26d9..81d0fe3 100755 --- a/openshift/scripts/sample-app.sh +++ b/openshift/scripts/sample-app.sh @@ -9,7 +9,7 @@ # Function to create the list of resource yamls create_app() { - search_dir=../sample + search_dir=../config for entry in "$search_dir"/* do echo "$entry" @@ -19,11 +19,11 @@ create_app() { # Function to create the list of resource yamls delete_app() { - search_dir=../sample + search_dir=../config for entry in "$search_dir"/* do echo "$entry" - oc delete -f $entry + oc delete -f "$entry" done } From d22373a291bb5c1088cc10cc6a1fd1ed7d07f45f Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 24 Jun 2024 15:41:53 +0200 Subject: [PATCH 39/78] Remove database credentials --- openshift/openshift.env | 3 --- 1 file changed, 3 deletions(-) diff --git a/openshift/openshift.env b/openshift/openshift.env index 3c8a98e..2e4c2bd 100644 --- a/openshift/openshift.env +++ b/openshift/openshift.env @@ -11,9 +11,6 @@ LOG_LEVEL=debug DB_CONNECTION=mysql DB_HOST=mariadb-sample DB_PORT=3306 -DB_DATABASE=development -DB_USERNAME=development -DB_PASSWORD=secret BROADCAST_DRIVER=log CACHE_DRIVER=file From 441f65594b999a690999aae1dea647d9f7267412 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 24 Jun 2024 16:16:14 +0200 Subject: [PATCH 40/78] Add database credentials --- openshift/config/06_sample-app.yaml | 12 ++++++------ openshift/openshift.env | 3 +++ openshift/scripts/sample-app.sh | 27 +++++++++++++++++++++++++-- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/openshift/config/06_sample-app.yaml b/openshift/config/06_sample-app.yaml index 752ede0..0e85cbb 100644 --- a/openshift/config/06_sample-app.yaml +++ b/openshift/config/06_sample-app.yaml @@ -21,32 +21,32 @@ spec: ports: - containerPort: 9000 env: - - name: LARAVEL_DATABASE_TYPE + - name: DB_CONNECTION valueFrom: configMapKeyRef: name: sample-config key: database-type - - name: LARAVEL_DATABASE_HOST + - name: DB_HOST valueFrom: configMapKeyRef: name: sample-config key: database-host - - name: LARAVEL_DATABASE_PORT_NUMBER + - name: DB_PORT valueFrom: configMapKeyRef: name: sample-config key: database-port-number - - name: LARAVEL_DATABASE_NAME + - name: DB_DATABASE valueFrom: configMapKeyRef: name: sample-config key: database-name - - name: LARAVEL_DATABASE_USER + - name: DB_USERNAME valueFrom: configMapKeyRef: name: mariadb-config key: mariadb-user - - name: LARAVEL_DATABASE_PASSWORD + - name: DB_PASSWORD valueFrom: secretKeyRef: name: mariadb-secret diff --git a/openshift/openshift.env b/openshift/openshift.env index 2e4c2bd..3c8a98e 100644 --- a/openshift/openshift.env +++ b/openshift/openshift.env @@ -11,6 +11,9 @@ LOG_LEVEL=debug DB_CONNECTION=mysql DB_HOST=mariadb-sample DB_PORT=3306 +DB_DATABASE=development +DB_USERNAME=development +DB_PASSWORD=secret BROADCAST_DRIVER=log CACHE_DRIVER=file diff --git a/openshift/scripts/sample-app.sh b/openshift/scripts/sample-app.sh index 81d0fe3..788e01b 100755 --- a/openshift/scripts/sample-app.sh +++ b/openshift/scripts/sample-app.sh @@ -12,8 +12,31 @@ create_app() { search_dir=../config for entry in "$search_dir"/* do - echo "$entry" - oc apply -f $entry + filename=$(basename -- "$entry") + if [ -f ../temp/"$filename" ]; then + echo "Use previously made file with credentials" + oc apply -f ../temp/"$filename" + continue + fi + + echo "Check for file with credential" + match=$(grep -o \<.*\> "$entry" | wc -l) + if [ "$match" -ne "0" ]; then + echo "Found credentials in file" + # TODO: Create loop and ceck ninimal length of password + word1=$(shuf -n1 /usr/share/dict/american-english | sed "s/'//g") + word2=$(shuf -n1 /usr/share/dict/american-english | sed "s/'//g") + word3=$(shuf -n1 /usr/share/dict/american-english | sed "s/'//g") + word="${word1}-${word2}-${word3}" + echo "used password: $word for $filename" + hash="$(echo -n $word | base64)" + echo $hash + sed "s/<.*>/"$hash"/g" "$entry" > ../temp/"$filename" + oc apply -f ../temp/"$filename" + continue + fi + echo "$entry" + oc apply -f "$entry" done } From abef788044d0c4c08147e71eb1fe2c48fe7d1518 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 24 Jun 2024 16:27:48 +0200 Subject: [PATCH 41/78] Add database credentials --- config/database.php | 10 +++++----- openshift/temp/.gitignore | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 openshift/temp/.gitignore diff --git a/config/database.php b/config/database.php index 137ad18..8a9c595 100644 --- a/config/database.php +++ b/config/database.php @@ -46,11 +46,11 @@ 'mysql' => [ 'driver' => 'mysql', 'url' => env('DATABASE_URL'), - 'host' => env('DB_HOST', '127.0.0.1'), - 'port' => env('DB_PORT', '3306'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), + 'host' => getenv('DB_HOST', '127.0.0.1'), + 'port' => getenv('DB_PORT', '3306'), + 'database' => getenv('DB_DATABASE', 'forge'), + 'username' => getenv('DB_USERNAME', 'forge'), + 'password' => getenv('DB_PASSWORD', ''), 'unix_socket' => env('DB_SOCKET', ''), 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', diff --git a/openshift/temp/.gitignore b/openshift/temp/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/openshift/temp/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore From f9ab3097621ab36af98e14ce1e7c964d42d5531a Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 24 Jun 2024 17:27:53 +0200 Subject: [PATCH 42/78] Add database credentials --- config/database.php | 10 +++++----- openshift/config/06_sample-app.yaml | 10 +++++----- openshift/config/11_sample_whitlist.yaml | 15 +++++++++++++++ openshift/openshift.env | 5 ----- 4 files changed, 25 insertions(+), 15 deletions(-) create mode 100644 openshift/config/11_sample_whitlist.yaml diff --git a/config/database.php b/config/database.php index 8a9c595..f0b6dd4 100644 --- a/config/database.php +++ b/config/database.php @@ -46,11 +46,11 @@ 'mysql' => [ 'driver' => 'mysql', 'url' => env('DATABASE_URL'), - 'host' => getenv('DB_HOST', '127.0.0.1'), - 'port' => getenv('DB_PORT', '3306'), - 'database' => getenv('DB_DATABASE', 'forge'), - 'username' => getenv('DB_USERNAME', 'forge'), - 'password' => getenv('DB_PASSWORD', ''), + 'host' => env('DB_HOST', getenv('OPENSHIFT_MYSQL_DB_HOST')), + 'database' => env('DB_DATABASE', getenv('OPENSHIFT_APP_NAME')), + 'username' => env('DB_USERNAME', getenv('OPENSHIFT_MYSQL_DB_USERNAME')), + 'password' => env('DB_PASSWORD', getenv('OPENSHIFT_MYSQL_DB_PASSWORD')), + 'port' => env('DB_PORT', getenv('OPENSHIFT_MYSQL_DB_PORT')), 'unix_socket' => env('DB_SOCKET', ''), 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', diff --git a/openshift/config/06_sample-app.yaml b/openshift/config/06_sample-app.yaml index 0e85cbb..88db180 100644 --- a/openshift/config/06_sample-app.yaml +++ b/openshift/config/06_sample-app.yaml @@ -26,27 +26,27 @@ spec: configMapKeyRef: name: sample-config key: database-type - - name: DB_HOST + - name: OPENSHIFT_MYSQL_DB_HOST valueFrom: configMapKeyRef: name: sample-config key: database-host - - name: DB_PORT + - name: OPENSHIFT_MYSQL_DB_PORT valueFrom: configMapKeyRef: name: sample-config key: database-port-number - - name: DB_DATABASE + - name: OPENSHIFT_APP_NAME valueFrom: configMapKeyRef: name: sample-config key: database-name - - name: DB_USERNAME + - name: OPENSHIFT_MYSQL_DB_USERNAME valueFrom: configMapKeyRef: name: mariadb-config key: mariadb-user - - name: DB_PASSWORD + - name: OPENSHIFT_MYSQL_DB_PASSWORD valueFrom: secretKeyRef: name: mariadb-secret diff --git a/openshift/config/11_sample_whitlist.yaml b/openshift/config/11_sample_whitlist.yaml new file mode 100644 index 0000000..8a9a7db --- /dev/null +++ b/openshift/config/11_sample_whitlist.yaml @@ -0,0 +1,15 @@ +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + name: sample-whitelist + namespace: uu-0219959 + labels: + app: fsw-sample-app + app.kubernetes.io/part-of: fsw-sample-app + annotations: + haproxy.router.openshift.io/ip_whitelist: "131.211.0.0/16" +spec: + host: app.openshift.fss.uu.nl + to: + name: nginx + diff --git a/openshift/openshift.env b/openshift/openshift.env index 3c8a98e..ca1c81b 100644 --- a/openshift/openshift.env +++ b/openshift/openshift.env @@ -9,11 +9,6 @@ LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug DB_CONNECTION=mysql -DB_HOST=mariadb-sample -DB_PORT=3306 -DB_DATABASE=development -DB_USERNAME=development -DB_PASSWORD=secret BROADCAST_DRIVER=log CACHE_DRIVER=file From b063ac7d707863a5c82b9f5d647775486130681a Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 25 Jun 2024 09:54:49 +0200 Subject: [PATCH 43/78] Export database credentials to env --- openshift/config/10_sample-ingress.yaml | 1 + openshift/config/11_sample_whitlist.yaml | 15 ----- openshift/laravel-env.sh | 75 ++++++++++++++++++++++++ openshift/openshift-entrypoint.sh | 5 ++ 4 files changed, 81 insertions(+), 15 deletions(-) delete mode 100644 openshift/config/11_sample_whitlist.yaml create mode 100644 openshift/laravel-env.sh diff --git a/openshift/config/10_sample-ingress.yaml b/openshift/config/10_sample-ingress.yaml index 1a8d9ee..1a93e55 100644 --- a/openshift/config/10_sample-ingress.yaml +++ b/openshift/config/10_sample-ingress.yaml @@ -5,6 +5,7 @@ metadata: namespace: uu-0219959 annotations: cert-manager.io/cluster-issuer: sectigo + haproxy.router.openshift.io/ip_whitelist: "131.211.0.0/16" spec: tls: - hosts: diff --git a/openshift/config/11_sample_whitlist.yaml b/openshift/config/11_sample_whitlist.yaml deleted file mode 100644 index 8a9a7db..0000000 --- a/openshift/config/11_sample_whitlist.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - name: sample-whitelist - namespace: uu-0219959 - labels: - app: fsw-sample-app - app.kubernetes.io/part-of: fsw-sample-app - annotations: - haproxy.router.openshift.io/ip_whitelist: "131.211.0.0/16" -spec: - host: app.openshift.fss.uu.nl - to: - name: nginx - diff --git a/openshift/laravel-env.sh b/openshift/laravel-env.sh new file mode 100644 index 0000000..c0839fa --- /dev/null +++ b/openshift/laravel-env.sh @@ -0,0 +1,75 @@ +#!/bin/bash +# Copyright Broadcom, Inc. All Rights Reserved. +# SPDX-License-Identifier: APACHE-2.0 +# +# Environment configuration for laravel + +# The values for all environment variables will be set in the below order of precedence +# 1. Custom environment variables defined below after Bitnami defaults +# 2. Constants defined in this file (environment variables with no default), i.e. BITNAMI_ROOT_DIR +# 3. Environment variables overridden via external files using *_FILE variables (see below) +# 4. Environment variables set externally (i.e. current Bash context/Dockerfile/userdata) + +# By setting an environment variable matching *_FILE to a file path, the prefixed environment +# variable will be overridden with the value specified in that file +laravel_env_vars=( + LARAVEL_PORT_NUMBER + LARAVEL_SKIP_COMPOSER_UPDATE + LARAVEL_SKIP_DATABASE + LARAVEL_DATABASE_TYPE + LARAVEL_DATABASE_HOST + LARAVEL_DATABASE_PORT_NUMBER + LARAVEL_DATABASE_NAME + LARAVEL_DATABASE_USER + LARAVEL_DATABASE_PASSWORD + SKIP_COMPOSER_UPDATE + DB_CONNECTION + DB_HOST + DB_PORT + DB_DATABASE + DB_USERNAME + DB_PASSWORD +) +for env_var in "${laravel_env_vars[@]}"; do + file_env_var="${env_var}_FILE" + if [[ -n "${!file_env_var:-}" ]]; then + if [[ -r "${!file_env_var:-}" ]]; then + export "${env_var}=$(< "${!file_env_var}")" + unset "${file_env_var}" + else + warn "Skipping export of '${env_var}'. '${!file_env_var:-}' is not readable." + fi + fi +done +unset laravel_env_vars + +# Paths +#export LARAVEL_BASE_DIR="${BITNAMI_ROOT_DIR}/laravel" + +# Laravel configuration +export LARAVEL_PORT_NUMBER="${LARAVEL_PORT_NUMBER:-8080}" +LARAVEL_SKIP_COMPOSER_UPDATE="${LARAVEL_SKIP_COMPOSER_UPDATE:-"${SKIP_COMPOSER_UPDATE:-}"}" +export LARAVEL_SKIP_COMPOSER_UPDATE="${LARAVEL_SKIP_COMPOSER_UPDATE:-no}" +export LARAVEL_SKIP_DATABASE="${LARAVEL_SKIP_DATABASE:-no}" # only used during the first initialization + +# Database configuration +LARAVEL_DATABASE_TYPE="${LARAVEL_DATABASE_TYPE:-"${DB_CONNECTION:-}"}" +export LARAVEL_DATABASE_TYPE="${LARAVEL_DATABASE_TYPE:-mysql}" +export DB_CONNECTION="$LARAVEL_DATABASE_TYPE" # only used during the first initialization +LARAVEL_DATABASE_HOST="${LARAVEL_DATABASE_HOST:-"${DB_HOST:-}"}" +export LARAVEL_DATABASE_HOST="${LARAVEL_DATABASE_HOST:-mariadb}" +export DB_HOST="$LARAVEL_DATABASE_HOST" # only used during the first initialization +LARAVEL_DATABASE_PORT_NUMBER="${LARAVEL_DATABASE_PORT_NUMBER:-"${DB_PORT:-}"}" +export LARAVEL_DATABASE_PORT_NUMBER="${LARAVEL_DATABASE_PORT_NUMBER:-3306}" +export DB_PORT="$LARAVEL_DATABASE_PORT_NUMBER" # only used during the first initialization +LARAVEL_DATABASE_NAME="${LARAVEL_DATABASE_NAME:-"${DB_DATABASE:-}"}" +export LARAVEL_DATABASE_NAME="${LARAVEL_DATABASE_NAME:-bitnami_myapp}" +export DB_DATABASE="$LARAVEL_DATABASE_NAME" # only used during the first initialization +LARAVEL_DATABASE_USER="${LARAVEL_DATABASE_USER:-"${DB_USERNAME:-}"}" +export LARAVEL_DATABASE_USER="${LARAVEL_DATABASE_USER:-bn_myapp}" +export DB_USERNAME="$LARAVEL_DATABASE_USER" # only used during the first initialization +LARAVEL_DATABASE_PASSWORD="${LARAVEL_DATABASE_PASSWORD:-"${DB_PASSWORD:-}"}" +export LARAVEL_DATABASE_PASSWORD="${LARAVEL_DATABASE_PASSWORD:-}" +export DB_PASSWORD="$LARAVEL_DATABASE_PASSWORD" # only used during the first initialization + +# Custom environment variables may be defined below diff --git a/openshift/openshift-entrypoint.sh b/openshift/openshift-entrypoint.sh index e285b8d..7773981 100644 --- a/openshift/openshift-entrypoint.sh +++ b/openshift/openshift-entrypoint.sh @@ -1,5 +1,10 @@ #!/usr/bin/env bash echo " ⭐️️️️️⭐️️️️️⭐️️️️️⭐️ VERSIE: 1 " + +echo "⭐️ Load Laravel environment"; +. /laravel-env.sh + + # run artisan migrate & seed echo "⭐️ Run artisan migrate"; php artisan migrate --seed From 1ba3ba1e8f9ae6be90bb64732b8bf54a126e807d Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 25 Jun 2024 10:01:47 +0200 Subject: [PATCH 44/78] Export database credentials to env TYPO --- openshift/openshift-entrypoint.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openshift/openshift-entrypoint.sh b/openshift/openshift-entrypoint.sh index 7773981..e053819 100644 --- a/openshift/openshift-entrypoint.sh +++ b/openshift/openshift-entrypoint.sh @@ -2,8 +2,7 @@ echo " ⭐️️️️️⭐️️️️️⭐️️️️️⭐️ VERSIE: 1 " echo "⭐️ Load Laravel environment"; -. /laravel-env.sh - +./laravel-env.sh # run artisan migrate & seed echo "⭐️ Run artisan migrate"; From 37aeaac23674c7f2ad6364bc172503632f58b39f Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 25 Jun 2024 10:07:25 +0200 Subject: [PATCH 45/78] Export database credentials to env WIP --- openshift/laravel-env.sh | 0 openshift/openshift-entrypoint.sh | 2 ++ 2 files changed, 2 insertions(+) mode change 100644 => 100755 openshift/laravel-env.sh diff --git a/openshift/laravel-env.sh b/openshift/laravel-env.sh old mode 100644 new mode 100755 diff --git a/openshift/openshift-entrypoint.sh b/openshift/openshift-entrypoint.sh index e053819..ed5108b 100644 --- a/openshift/openshift-entrypoint.sh +++ b/openshift/openshift-entrypoint.sh @@ -2,6 +2,8 @@ echo " ⭐️️️️️⭐️️️️️⭐️️️️️⭐️ VERSIE: 1 " echo "⭐️ Load Laravel environment"; +pwd + ./laravel-env.sh # run artisan migrate & seed From 6129a00a86efaaad63c229bb57499f2b0c71dabf Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 25 Jun 2024 10:10:24 +0200 Subject: [PATCH 46/78] Export database credentials to env WIP --- openshift/openshift-entrypoint.sh | 2 +- openshift/{ => scripts}/laravel-env.sh | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename openshift/{ => scripts}/laravel-env.sh (100%) diff --git a/openshift/openshift-entrypoint.sh b/openshift/openshift-entrypoint.sh index ed5108b..8b85ea2 100644 --- a/openshift/openshift-entrypoint.sh +++ b/openshift/openshift-entrypoint.sh @@ -4,7 +4,7 @@ echo " ⭐️️️️️⭐️️️️️⭐️️️️️⭐️ VERSIE: 1 " echo "⭐️ Load Laravel environment"; pwd -./laravel-env.sh +./openshift/scripts/laravel-env.sh # run artisan migrate & seed echo "⭐️ Run artisan migrate"; diff --git a/openshift/laravel-env.sh b/openshift/scripts/laravel-env.sh similarity index 100% rename from openshift/laravel-env.sh rename to openshift/scripts/laravel-env.sh From 2e4a48ca0f7d18e333d63fdb1c22aa51ab8b02e7 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 25 Jun 2024 10:15:44 +0200 Subject: [PATCH 47/78] Export database credentials to env WIP --- openshift/openshift-entrypoint.sh | 2 +- openshift/openshift.env | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/openshift/openshift-entrypoint.sh b/openshift/openshift-entrypoint.sh index 8b85ea2..2ceda86 100644 --- a/openshift/openshift-entrypoint.sh +++ b/openshift/openshift-entrypoint.sh @@ -4,7 +4,7 @@ echo " ⭐️️️️️⭐️️️️️⭐️️️️️⭐️ VERSIE: 1 " echo "⭐️ Load Laravel environment"; pwd -./openshift/scripts/laravel-env.sh +. /var/www/openshift/scripts/laravel-env.sh # run artisan migrate & seed echo "⭐️ Run artisan migrate"; diff --git a/openshift/openshift.env b/openshift/openshift.env index ca1c81b..5a218d9 100644 --- a/openshift/openshift.env +++ b/openshift/openshift.env @@ -9,6 +9,11 @@ LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug DB_CONNECTION=mysql +DB_HOST=mariadb +DB_PORT=3306 +DB_DATABASE=development +DB_USERNAME=development +DB_PASSWORD=secret BROADCAST_DRIVER=log CACHE_DRIVER=file From 3f519348a134cb8c8437aff9b9043fd3b2dd74f7 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 25 Jun 2024 10:28:55 +0200 Subject: [PATCH 48/78] Export database credentials to env WIP --- openshift/config/06_sample-app.yaml | 12 ++--- openshift/openshift-entrypoint.sh | 2 +- openshift/scripts/laravel-env.sh | 6 +-- openshift/scripts/liblaravel.sh | 81 +++++++++++++++++++++++++++++ openshift/scripts/setup.sh | 14 +++++ 5 files changed, 104 insertions(+), 11 deletions(-) create mode 100644 openshift/scripts/liblaravel.sh create mode 100755 openshift/scripts/setup.sh diff --git a/openshift/config/06_sample-app.yaml b/openshift/config/06_sample-app.yaml index 88db180..752ede0 100644 --- a/openshift/config/06_sample-app.yaml +++ b/openshift/config/06_sample-app.yaml @@ -21,32 +21,32 @@ spec: ports: - containerPort: 9000 env: - - name: DB_CONNECTION + - name: LARAVEL_DATABASE_TYPE valueFrom: configMapKeyRef: name: sample-config key: database-type - - name: OPENSHIFT_MYSQL_DB_HOST + - name: LARAVEL_DATABASE_HOST valueFrom: configMapKeyRef: name: sample-config key: database-host - - name: OPENSHIFT_MYSQL_DB_PORT + - name: LARAVEL_DATABASE_PORT_NUMBER valueFrom: configMapKeyRef: name: sample-config key: database-port-number - - name: OPENSHIFT_APP_NAME + - name: LARAVEL_DATABASE_NAME valueFrom: configMapKeyRef: name: sample-config key: database-name - - name: OPENSHIFT_MYSQL_DB_USERNAME + - name: LARAVEL_DATABASE_USER valueFrom: configMapKeyRef: name: mariadb-config key: mariadb-user - - name: OPENSHIFT_MYSQL_DB_PASSWORD + - name: LARAVEL_DATABASE_PASSWORD valueFrom: secretKeyRef: name: mariadb-secret diff --git a/openshift/openshift-entrypoint.sh b/openshift/openshift-entrypoint.sh index 2ceda86..9b2eda3 100644 --- a/openshift/openshift-entrypoint.sh +++ b/openshift/openshift-entrypoint.sh @@ -4,7 +4,7 @@ echo " ⭐️️️️️⭐️️️️️⭐️️️️️⭐️ VERSIE: 1 " echo "⭐️ Load Laravel environment"; pwd -. /var/www/openshift/scripts/laravel-env.sh +/var/www/openshift/scripts/setup.sh # run artisan migrate & seed echo "⭐️ Run artisan migrate"; diff --git a/openshift/scripts/laravel-env.sh b/openshift/scripts/laravel-env.sh index c0839fa..f9f9bf3 100755 --- a/openshift/scripts/laravel-env.sh +++ b/openshift/scripts/laravel-env.sh @@ -1,8 +1,6 @@ #!/bin/bash -# Copyright Broadcom, Inc. All Rights Reserved. -# SPDX-License-Identifier: APACHE-2.0 -# -# Environment configuration for laravel + +echo "⭐️ Load Laravel Environment Variables"; # The values for all environment variables will be set in the below order of precedence # 1. Custom environment variables defined below after Bitnami defaults diff --git a/openshift/scripts/liblaravel.sh b/openshift/scripts/liblaravel.sh new file mode 100644 index 0000000..d28c149 --- /dev/null +++ b/openshift/scripts/liblaravel.sh @@ -0,0 +1,81 @@ +#!/bin/bash +laravel_validate() { + info "Validating settings in LARAVEL_* environment variables..." + local error_code=0 + + # Auxiliary functions + print_validation_error() { + error "$1" + error_code=1 + } + check_empty_value() { + if is_empty_value "${!1}"; then + print_validation_error "${1} must be set" + fi + } + check_yes_no_value() { + if ! is_yes_no_value "${!1}" && ! is_true_false_value "${!1}"; then + print_validation_error "The allowed values for ${1} are: yes no" + fi + } + check_resolved_hostname() { + if ! is_hostname_resolved "$1"; then + warn "Hostname ${1} could not be resolved, this could lead to connection issues" + fi + } + check_valid_port() { + local port_var="${1:?missing port variable}" + local err + if ! err="$(validate_port "${!port_var}")"; then + print_validation_error "An invalid port was specified in the environment variable ${port_var}: ${err}." + fi + } + + # Validate user inputs + check_yes_no_value "LARAVEL_SKIP_COMPOSER_UPDATE" + check_yes_no_value "LARAVEL_SKIP_DATABASE" + + # Database configuration validations + check_resolved_hostname "$LARAVEL_DATABASE_HOST" + check_valid_port "LARAVEL_DATABASE_PORT_NUMBER" + + return "$error_code" +} + +######################## +# Ensure the Laravel app is initialized +# Globals: +# None +# Arguments: +# None +# Returns: +# None +######################### +laravel_initialize() { + if is_dir_empty "/app"; then + info "Creating Laravel application in /app" + cp -r "${LARAVEL_BASE_DIR}/." . + + info "Regenerating APP_KEY" + debug_execute php artisan key:generate --ansi + + if ! is_boolean_yes "$LARAVEL_SKIP_COMPOSER_UPDATE"; then + log "Updating dependencies" + debug_execute composer update + fi + + info "Trying to connect to the database server" + if ! retry_while "debug_execute wait-for-port --timeout 5 --host ${LARAVEL_DATABASE_HOST} ${LARAVEL_DATABASE_PORT_NUMBER}"; then + error "Could not connect to the database" + return 1 + fi + + info "Executing database migrations" + debug_execute php artisan migrate + else + info "An existing project was detected, skipping project creation" + fi + + # Avoid exit code of previous commands to affect the result of this function + true +} diff --git a/openshift/scripts/setup.sh b/openshift/scripts/setup.sh new file mode 100755 index 0000000..f936f26 --- /dev/null +++ b/openshift/scripts/setup.sh @@ -0,0 +1,14 @@ +#!/bin/bash +echo "⭐️ Load Laravel Setup"; +# Load libraries +. /var/www/openshift/scripts/liblaravel.sh + +# Load Laravel environment +. /var/www/openshift/scripts/laravel-env.sh + +# Ensure Laravel environment variables are valid +laravel_validate + +# Ensure Laravel app is initialized +laravel_initialize + From 2965d6ecd9689535200aee5980ad6ba0f6d06184 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 25 Jun 2024 10:49:21 +0200 Subject: [PATCH 49/78] Export database credentials to env WIP 2 --- config/database.php | 10 +- openshift/openshift-entrypoint.sh | 1 + openshift/scripts/liblaravel.sh | 38 ---- openshift/scripts/liblog.sh | 114 +++++++++++ openshift/scripts/libvalidations.sh | 304 ++++++++++++++++++++++++++++ openshift/scripts/setup.sh | 3 +- resources/views/welcome.blade.php | 3 +- 7 files changed, 427 insertions(+), 46 deletions(-) create mode 100644 openshift/scripts/liblog.sh create mode 100644 openshift/scripts/libvalidations.sh diff --git a/config/database.php b/config/database.php index f0b6dd4..e09b53f 100644 --- a/config/database.php +++ b/config/database.php @@ -46,11 +46,11 @@ 'mysql' => [ 'driver' => 'mysql', 'url' => env('DATABASE_URL'), - 'host' => env('DB_HOST', getenv('OPENSHIFT_MYSQL_DB_HOST')), - 'database' => env('DB_DATABASE', getenv('OPENSHIFT_APP_NAME')), - 'username' => env('DB_USERNAME', getenv('OPENSHIFT_MYSQL_DB_USERNAME')), - 'password' => env('DB_PASSWORD', getenv('OPENSHIFT_MYSQL_DB_PASSWORD')), - 'port' => env('DB_PORT', getenv('OPENSHIFT_MYSQL_DB_PORT')), + 'host' => env('DB_HOST', getenv('LARAVEL_DATABASE_HOST')), + 'database' => env('DB_DATABASE', getenv('LARAVEL_DATABASE_NAME')), + 'username' => env('DB_USERNAME', getenv('LARAVEL_DATABASE_USER')), + 'password' => env('DB_PASSWORD', getenv('LARAVEL_DATABASE_PASSWORD')), + 'port' => env('DB_PORT', getenv('LARAVEL_DATABASE_PORT_NUMBER')), 'unix_socket' => env('DB_SOCKET', ''), 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', diff --git a/openshift/openshift-entrypoint.sh b/openshift/openshift-entrypoint.sh index 9b2eda3..5fe0402 100644 --- a/openshift/openshift-entrypoint.sh +++ b/openshift/openshift-entrypoint.sh @@ -6,6 +6,7 @@ pwd /var/www/openshift/scripts/setup.sh + # run artisan migrate & seed echo "⭐️ Run artisan migrate"; php artisan migrate --seed diff --git a/openshift/scripts/liblaravel.sh b/openshift/scripts/liblaravel.sh index d28c149..ce7364c 100644 --- a/openshift/scripts/liblaravel.sh +++ b/openshift/scripts/liblaravel.sh @@ -41,41 +41,3 @@ laravel_validate() { return "$error_code" } - -######################## -# Ensure the Laravel app is initialized -# Globals: -# None -# Arguments: -# None -# Returns: -# None -######################### -laravel_initialize() { - if is_dir_empty "/app"; then - info "Creating Laravel application in /app" - cp -r "${LARAVEL_BASE_DIR}/." . - - info "Regenerating APP_KEY" - debug_execute php artisan key:generate --ansi - - if ! is_boolean_yes "$LARAVEL_SKIP_COMPOSER_UPDATE"; then - log "Updating dependencies" - debug_execute composer update - fi - - info "Trying to connect to the database server" - if ! retry_while "debug_execute wait-for-port --timeout 5 --host ${LARAVEL_DATABASE_HOST} ${LARAVEL_DATABASE_PORT_NUMBER}"; then - error "Could not connect to the database" - return 1 - fi - - info "Executing database migrations" - debug_execute php artisan migrate - else - info "An existing project was detected, skipping project creation" - fi - - # Avoid exit code of previous commands to affect the result of this function - true -} diff --git a/openshift/scripts/liblog.sh b/openshift/scripts/liblog.sh new file mode 100644 index 0000000..450f05b --- /dev/null +++ b/openshift/scripts/liblog.sh @@ -0,0 +1,114 @@ +#!/bin/bash +# Copyright Broadcom, Inc. All Rights Reserved. +# SPDX-License-Identifier: APACHE-2.0 +# +# Library for logging functions + +# Constants +RESET='\033[0m' +RED='\033[38;5;1m' +GREEN='\033[38;5;2m' +YELLOW='\033[38;5;3m' +MAGENTA='\033[38;5;5m' +CYAN='\033[38;5;6m' + +# Functions + +######################## +# Print to STDERR +# Arguments: +# Message to print +# Returns: +# None +######################### +stderr_print() { + # 'is_boolean_yes' is defined in libvalidations.sh, but depends on this file so we cannot source it + local bool="${BITNAMI_QUIET:-false}" + # comparison is performed without regard to the case of alphabetic characters + shopt -s nocasematch + if ! [[ "$bool" = 1 || "$bool" =~ ^(yes|true)$ ]]; then + printf "%b\\n" "${*}" >&2 + fi +} + +######################## +# Log message +# Arguments: +# Message to log +# Returns: +# None +######################### +log() { + stderr_print "${CYAN}${MODULE:-} ${MAGENTA}$(date "+%T.%2N ")${RESET}${*}" +} +######################## +# Log an 'info' message +# Arguments: +# Message to log +# Returns: +# None +######################### +info() { + log "${GREEN}INFO ${RESET} ==> ${*}" +} +######################## +# Log message +# Arguments: +# Message to log +# Returns: +# None +######################### +warn() { + log "${YELLOW}WARN ${RESET} ==> ${*}" +} +######################## +# Log an 'error' message +# Arguments: +# Message to log +# Returns: +# None +######################### +error() { + log "${RED}ERROR${RESET} ==> ${*}" +} +######################## +# Log a 'debug' message +# Globals: +# BITNAMI_DEBUG +# Arguments: +# None +# Returns: +# None +######################### +debug() { + # 'is_boolean_yes' is defined in libvalidations.sh, but depends on this file so we cannot source it + local bool="${BITNAMI_DEBUG:-false}" + # comparison is performed without regard to the case of alphabetic characters + shopt -s nocasematch + if [[ "$bool" = 1 || "$bool" =~ ^(yes|true)$ ]]; then + log "${MAGENTA}DEBUG${RESET} ==> ${*}" + fi +} + +######################## +# Indent a string +# Arguments: +# $1 - string +# $2 - number of indentation characters (default: 4) +# $3 - indentation character (default: " ") +# Returns: +# None +######################### +indent() { + local string="${1:-}" + local num="${2:?missing num}" + local char="${3:-" "}" + # Build the indentation unit string + local indent_unit="" + for ((i = 0; i < num; i++)); do + indent_unit="${indent_unit}${char}" + done + # shellcheck disable=SC2001 + # Complex regex, see https://github.com/koalaman/shellcheck/wiki/SC2001#exceptions + echo "$string" | sed "s/^/${indent_unit}/" +} diff --git a/openshift/scripts/libvalidations.sh b/openshift/scripts/libvalidations.sh new file mode 100644 index 0000000..b4084bb --- /dev/null +++ b/openshift/scripts/libvalidations.sh @@ -0,0 +1,304 @@ +#!/bin/bash +# Copyright Broadcom, Inc. All Rights Reserved. +# SPDX-License-Identifier: APACHE-2.0 +# +# Validation functions library + +# shellcheck disable=SC1091,SC2086 + +# Load Generic Libraries +. /opt/bitnami/scripts/liblog.sh + +# Functions + +######################## +# Check if the provided argument is an integer +# Arguments: +# $1 - Value to check +# Returns: +# Boolean +######################### +is_int() { + local -r int="${1:?missing value}" + if [[ "$int" =~ ^-?[0-9]+ ]]; then + true + else + false + fi +} + +######################## +# Check if the provided argument is a positive integer +# Arguments: +# $1 - Value to check +# Returns: +# Boolean +######################### +is_positive_int() { + local -r int="${1:?missing value}" + if is_int "$int" && (( "${int}" >= 0 )); then + true + else + false + fi +} + +######################## +# Check if the provided argument is a boolean or is the string 'yes/true' +# Arguments: +# $1 - Value to check +# Returns: +# Boolean +######################### +is_boolean_yes() { + local -r bool="${1:-}" + # comparison is performed without regard to the case of alphabetic characters + shopt -s nocasematch + if [[ "$bool" = 1 || "$bool" =~ ^(yes|true)$ ]]; then + true + else + false + fi +} + +######################## +# Check if the provided argument is a boolean yes/no value +# Arguments: +# $1 - Value to check +# Returns: +# Boolean +######################### +is_yes_no_value() { + local -r bool="${1:-}" + if [[ "$bool" =~ ^(yes|no)$ ]]; then + true + else + false + fi +} + +######################## +# Check if the provided argument is a boolean true/false value +# Arguments: +# $1 - Value to check +# Returns: +# Boolean +######################### +is_true_false_value() { + local -r bool="${1:-}" + if [[ "$bool" =~ ^(true|false)$ ]]; then + true + else + false + fi +} + +######################## +# Check if the provided argument is a boolean 1/0 value +# Arguments: +# $1 - Value to check +# Returns: +# Boolean +######################### +is_1_0_value() { + local -r bool="${1:-}" + if [[ "$bool" =~ ^[10]$ ]]; then + true + else + false + fi +} + +######################## +# Check if the provided argument is an empty string or not defined +# Arguments: +# $1 - Value to check +# Returns: +# Boolean +######################### +is_empty_value() { + local -r val="${1:-}" + if [[ -z "$val" ]]; then + true + else + false + fi +} + +######################## +# Validate if the provided argument is a valid port +# Arguments: +# $1 - Port to validate +# Returns: +# Boolean and error message +######################### +validate_port() { + local value + local unprivileged=0 + + # Parse flags + while [[ "$#" -gt 0 ]]; do + case "$1" in + -unprivileged) + unprivileged=1 + ;; + --) + shift + break + ;; + -*) + stderr_print "unrecognized flag $1" + return 1 + ;; + *) + break + ;; + esac + shift + done + + if [[ "$#" -gt 1 ]]; then + echo "too many arguments provided" + return 2 + elif [[ "$#" -eq 0 ]]; then + stderr_print "missing port argument" + return 1 + else + value=$1 + fi + + if [[ -z "$value" ]]; then + echo "the value is empty" + return 1 + else + if ! is_int "$value"; then + echo "value is not an integer" + return 2 + elif [[ "$value" -lt 0 ]]; then + echo "negative value provided" + return 2 + elif [[ "$value" -gt 65535 ]]; then + echo "requested port is greater than 65535" + return 2 + elif [[ "$unprivileged" = 1 && "$value" -lt 1024 ]]; then + echo "privileged port requested" + return 3 + fi + fi +} + +######################## +# Validate if the provided argument is a valid IPv6 address +# Arguments: +# $1 - IP to validate +# Returns: +# Boolean +######################### +validate_ipv6() { + local ip="${1:?ip is missing}" + local stat=1 + local full_address_regex='^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$' + local short_address_regex='^((([0-9a-fA-F]{1,4}:){0,6}[0-9a-fA-F]{1,4}){0,6}::(([0-9a-fA-F]{1,4}:){0,6}[0-9a-fA-F]{1,4}){0,6})$' + + if [[ $ip =~ $full_address_regex || $ip =~ $short_address_regex || $ip == "::" ]]; then + stat=0 + fi + return $stat +} + +######################## +# Validate if the provided argument is a valid IPv4 address +# Arguments: +# $1 - IP to validate +# Returns: +# Boolean +######################### +validate_ipv4() { + local ip="${1:?ip is missing}" + local stat=1 + + if [[ $ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then + read -r -a ip_array <<< "$(tr '.' ' ' <<< "$ip")" + [[ ${ip_array[0]} -le 255 && ${ip_array[1]} -le 255 \ + && ${ip_array[2]} -le 255 && ${ip_array[3]} -le 255 ]] + stat=$? + fi + return $stat +} + +######################## +# Validate if the provided argument is a valid IPv4 or IPv6 address +# Arguments: +# $1 - IP to validate +# Returns: +# Boolean +######################### +validate_ip() { + local ip="${1:?ip is missing}" + local stat=1 + + if validate_ipv4 "$ip"; then + stat=0 + else + stat=$(validate_ipv6 "$ip") + fi + return $stat +} + +######################## +# Validate a string format +# Arguments: +# $1 - String to validate +# Returns: +# Boolean +######################### +validate_string() { + local string + local min_length=-1 + local max_length=-1 + + # Parse flags + while [ "$#" -gt 0 ]; do + case "$1" in + -min-length) + shift + min_length=${1:-} + ;; + -max-length) + shift + max_length=${1:-} + ;; + --) + shift + break + ;; + -*) + stderr_print "unrecognized flag $1" + return 1 + ;; + *) + break + ;; + esac + shift + done + + if [ "$#" -gt 1 ]; then + stderr_print "too many arguments provided" + return 2 + elif [ "$#" -eq 0 ]; then + stderr_print "missing string" + return 1 + else + string=$1 + fi + + if [[ "$min_length" -ge 0 ]] && [[ "${#string}" -lt "$min_length" ]]; then + echo "string length is less than $min_length" + return 1 + fi + if [[ "$max_length" -ge 0 ]] && [[ "${#string}" -gt "$max_length" ]]; then + echo "string length is great than $max_length" + return 1 + fi +} diff --git a/openshift/scripts/setup.sh b/openshift/scripts/setup.sh index f936f26..4a6da66 100755 --- a/openshift/scripts/setup.sh +++ b/openshift/scripts/setup.sh @@ -5,10 +5,9 @@ echo "⭐️ Load Laravel Setup"; # Load Laravel environment . /var/www/openshift/scripts/laravel-env.sh +. /var/www/openshift/scripts/liblog.sh # Ensure Laravel environment variables are valid laravel_validate -# Ensure Laravel app is initialized -laravel_initialize diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index 3353350..243ef1a 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -37,7 +37,8 @@ - + +
From dfff02adff1d978e3e4a21f3bcbc99baa240ac77 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 25 Jun 2024 10:54:38 +0200 Subject: [PATCH 50/78] Export database credentials to env WIP 3 --- openshift/openshift.env | 5 ----- openshift/scripts/liblog.sh | 26 +++++++++++++------------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/openshift/openshift.env b/openshift/openshift.env index 5a218d9..ca1c81b 100644 --- a/openshift/openshift.env +++ b/openshift/openshift.env @@ -9,11 +9,6 @@ LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug DB_CONNECTION=mysql -DB_HOST=mariadb -DB_PORT=3306 -DB_DATABASE=development -DB_USERNAME=development -DB_PASSWORD=secret BROADCAST_DRIVER=log CACHE_DRIVER=file diff --git a/openshift/scripts/liblog.sh b/openshift/scripts/liblog.sh index 450f05b..c9cf469 100644 --- a/openshift/scripts/liblog.sh +++ b/openshift/scripts/liblog.sh @@ -99,16 +99,16 @@ debug() { # Returns: # None ######################### -indent() { - local string="${1:-}" - local num="${2:?missing num}" - local char="${3:-" "}" - # Build the indentation unit string - local indent_unit="" - for ((i = 0; i < num; i++)); do - indent_unit="${indent_unit}${char}" - done - # shellcheck disable=SC2001 - # Complex regex, see https://github.com/koalaman/shellcheck/wiki/SC2001#exceptions - echo "$string" | sed "s/^/${indent_unit}/" -} +#indent() { +# local string="${1:-}" +# local num="${2:?missing num}" +# local char="${3:-" "}" +# # Build the indentation unit string +# local indent_unit="" +# for ((i = 0; i < num; i++)); do +# indent_unit="${indent_unit}${char}" +# done +# # shellcheck disable=SC2001 +# # Complex regex, see https://github.com/koalaman/shellcheck/wiki/SC2001#exceptions +# echo "$string" | sed "s/^/${indent_unit}/" +#} From 55bf5481c6836516bf88c7d078a3e14ef0f9567f Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 25 Jun 2024 11:03:56 +0200 Subject: [PATCH 51/78] Export database credentials to env WIP 4 --- openshift/openshift.env | 5 +++++ openshift/scripts/setup.sh | 1 + 2 files changed, 6 insertions(+) diff --git a/openshift/openshift.env b/openshift/openshift.env index ca1c81b..e9490bc 100644 --- a/openshift/openshift.env +++ b/openshift/openshift.env @@ -9,6 +9,11 @@ LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug DB_CONNECTION=mysql +DB_HOST= +DB_PORT= +DB_DATABASE= +DB_USERNAME= +DB_PASSWORD= BROADCAST_DRIVER=log CACHE_DRIVER=file diff --git a/openshift/scripts/setup.sh b/openshift/scripts/setup.sh index 4a6da66..bc5e394 100755 --- a/openshift/scripts/setup.sh +++ b/openshift/scripts/setup.sh @@ -1,6 +1,7 @@ #!/bin/bash echo "⭐️ Load Laravel Setup"; # Load libraries +. /var/www/openshift/scripts/libvalidations.sh . /var/www/openshift/scripts/liblaravel.sh # Load Laravel environment From d351a6478f1ff0ea348319fa19dfda38e78a2fe8 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 25 Jun 2024 11:10:06 +0200 Subject: [PATCH 52/78] Export database credentials to env WIP 4 --- resources/views/welcome.blade.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index 243ef1a..814ee61 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -37,8 +37,10 @@
+ +
- +
+
+ +
+
From 51b3959a3774d2b887c2dee6f4289a73734058d2 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 25 Jun 2024 11:56:29 +0200 Subject: [PATCH 54/78] Export database credentials to env WIP 6 --- config/database.php | 2 ++ openshift/openshift-entrypoint.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/database.php b/config/database.php index b00cd8b..c6f35d0 100644 --- a/config/database.php +++ b/config/database.php @@ -2,6 +2,8 @@ use Illuminate\Support\Str; + +var_dump(getenv('LARAVEL_DATABASE_HOST')); return [ /* diff --git a/openshift/openshift-entrypoint.sh b/openshift/openshift-entrypoint.sh index 5fe0402..187e962 100644 --- a/openshift/openshift-entrypoint.sh +++ b/openshift/openshift-entrypoint.sh @@ -4,7 +4,7 @@ echo " ⭐️️️️️⭐️️️️️⭐️️️️️⭐️ VERSIE: 1 " echo "⭐️ Load Laravel environment"; pwd -/var/www/openshift/scripts/setup.sh +#/var/www/openshift/scripts/setup.sh # run artisan migrate & seed From 2bbf81442b14b998aa3bc85fb10e0cbe36acc27e Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 25 Jun 2024 12:06:48 +0200 Subject: [PATCH 55/78] Export database credentials to env WIP 7 --- openshift/openshift.dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 4ca2ff0..23b9bc5 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -36,6 +36,7 @@ RUN composer install COPY ./openshift/openshift.env /var/www/.env RUN chmod -R a+rw /var/www/storage +RUN chmod -R a+rw /var/www/bootstrap/cache RUN php artisan key:generate # entrypoint From 1b46562186a623bbfb265c246e62cfb6fc7e6a0d Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 25 Jun 2024 12:43:32 +0200 Subject: [PATCH 56/78] Export database credentials to env WIP 8 --- config/database.php | 12 +++++------- docker/backend.dockerfile | 4 ++++ openshift/openshift-entrypoint.sh | 6 +----- openshift/openshift.dockerfile | 4 ++++ openshift/openshift.env | 5 ----- 5 files changed, 14 insertions(+), 17 deletions(-) diff --git a/config/database.php b/config/database.php index c6f35d0..e09b53f 100644 --- a/config/database.php +++ b/config/database.php @@ -2,8 +2,6 @@ use Illuminate\Support\Str; - -var_dump(getenv('LARAVEL_DATABASE_HOST')); return [ /* @@ -48,11 +46,11 @@ 'mysql' => [ 'driver' => 'mysql', 'url' => env('DATABASE_URL'), - 'host' => getenv('LARAVEL_DATABASE_HOST'), - 'database' => getenv('LARAVEL_DATABASE_NAME'), - 'username' => getenv('LARAVEL_DATABASE_USER'), - 'password' => getenv('LARAVEL_DATABASE_PASSWORD'), - 'port' => getenv('LARAVEL_DATABASE_PORT_NUMBER'), + 'host' => env('DB_HOST', getenv('LARAVEL_DATABASE_HOST')), + 'database' => env('DB_DATABASE', getenv('LARAVEL_DATABASE_NAME')), + 'username' => env('DB_USERNAME', getenv('LARAVEL_DATABASE_USER')), + 'password' => env('DB_PASSWORD', getenv('LARAVEL_DATABASE_PASSWORD')), + 'port' => env('DB_PORT', getenv('LARAVEL_DATABASE_PORT_NUMBER')), 'unix_socket' => env('DB_SOCKET', ''), 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', diff --git a/docker/backend.dockerfile b/docker/backend.dockerfile index dc76807..d1eb1f1 100644 --- a/docker/backend.dockerfile +++ b/docker/backend.dockerfile @@ -10,6 +10,10 @@ RUN apt-get -y dist-upgrade RUN apt-get install -y zip RUN apt-get install -y sudo nano +RUN apt-get install -y mariadb-client + +# install mysql +RUN docker-php-ext-install pdo_mysql mysqli # install additional PHP extensions RUN apt-get install -y libmcrypt-dev \ diff --git a/openshift/openshift-entrypoint.sh b/openshift/openshift-entrypoint.sh index 187e962..1d9697c 100644 --- a/openshift/openshift-entrypoint.sh +++ b/openshift/openshift-entrypoint.sh @@ -1,11 +1,7 @@ #!/usr/bin/env bash echo " ⭐️️️️️⭐️️️️️⭐️️️️️⭐️ VERSIE: 1 " -echo "⭐️ Load Laravel environment"; -pwd - -#/var/www/openshift/scripts/setup.sh - +php artisan config:clear # run artisan migrate & seed echo "⭐️ Run artisan migrate"; diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 23b9bc5..49a19f7 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -10,6 +10,10 @@ RUN apt-get -y dist-upgrade RUN apt-get install -y zip RUN apt-get install -y sudo nano +RUN apt-get install -y mariadb-client + +# install mysql +RUN docker-php-ext-install pdo_mysql mysqli # install additional PHP extensions RUN apt-get install -y libmcrypt-dev \ diff --git a/openshift/openshift.env b/openshift/openshift.env index e9490bc..ca1c81b 100644 --- a/openshift/openshift.env +++ b/openshift/openshift.env @@ -9,11 +9,6 @@ LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug DB_CONNECTION=mysql -DB_HOST= -DB_PORT= -DB_DATABASE= -DB_USERNAME= -DB_PASSWORD= BROADCAST_DRIVER=log CACHE_DRIVER=file From 13300a3d6f13105a26277cf43b8d2940609c50a6 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 25 Jun 2024 13:04:18 +0200 Subject: [PATCH 57/78] Removed obsolete code. --- openshift/scripts/laravel-env.sh | 73 ------- openshift/scripts/liblaravel.sh | 43 ---- openshift/scripts/liblog.sh | 114 ----------- openshift/scripts/libvalidations.sh | 304 ---------------------------- openshift/scripts/setup.sh | 14 -- resources/views/welcome.blade.php | 7 - 6 files changed, 555 deletions(-) delete mode 100755 openshift/scripts/laravel-env.sh delete mode 100644 openshift/scripts/liblaravel.sh delete mode 100644 openshift/scripts/liblog.sh delete mode 100644 openshift/scripts/libvalidations.sh delete mode 100755 openshift/scripts/setup.sh diff --git a/openshift/scripts/laravel-env.sh b/openshift/scripts/laravel-env.sh deleted file mode 100755 index f9f9bf3..0000000 --- a/openshift/scripts/laravel-env.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash - -echo "⭐️ Load Laravel Environment Variables"; - -# The values for all environment variables will be set in the below order of precedence -# 1. Custom environment variables defined below after Bitnami defaults -# 2. Constants defined in this file (environment variables with no default), i.e. BITNAMI_ROOT_DIR -# 3. Environment variables overridden via external files using *_FILE variables (see below) -# 4. Environment variables set externally (i.e. current Bash context/Dockerfile/userdata) - -# By setting an environment variable matching *_FILE to a file path, the prefixed environment -# variable will be overridden with the value specified in that file -laravel_env_vars=( - LARAVEL_PORT_NUMBER - LARAVEL_SKIP_COMPOSER_UPDATE - LARAVEL_SKIP_DATABASE - LARAVEL_DATABASE_TYPE - LARAVEL_DATABASE_HOST - LARAVEL_DATABASE_PORT_NUMBER - LARAVEL_DATABASE_NAME - LARAVEL_DATABASE_USER - LARAVEL_DATABASE_PASSWORD - SKIP_COMPOSER_UPDATE - DB_CONNECTION - DB_HOST - DB_PORT - DB_DATABASE - DB_USERNAME - DB_PASSWORD -) -for env_var in "${laravel_env_vars[@]}"; do - file_env_var="${env_var}_FILE" - if [[ -n "${!file_env_var:-}" ]]; then - if [[ -r "${!file_env_var:-}" ]]; then - export "${env_var}=$(< "${!file_env_var}")" - unset "${file_env_var}" - else - warn "Skipping export of '${env_var}'. '${!file_env_var:-}' is not readable." - fi - fi -done -unset laravel_env_vars - -# Paths -#export LARAVEL_BASE_DIR="${BITNAMI_ROOT_DIR}/laravel" - -# Laravel configuration -export LARAVEL_PORT_NUMBER="${LARAVEL_PORT_NUMBER:-8080}" -LARAVEL_SKIP_COMPOSER_UPDATE="${LARAVEL_SKIP_COMPOSER_UPDATE:-"${SKIP_COMPOSER_UPDATE:-}"}" -export LARAVEL_SKIP_COMPOSER_UPDATE="${LARAVEL_SKIP_COMPOSER_UPDATE:-no}" -export LARAVEL_SKIP_DATABASE="${LARAVEL_SKIP_DATABASE:-no}" # only used during the first initialization - -# Database configuration -LARAVEL_DATABASE_TYPE="${LARAVEL_DATABASE_TYPE:-"${DB_CONNECTION:-}"}" -export LARAVEL_DATABASE_TYPE="${LARAVEL_DATABASE_TYPE:-mysql}" -export DB_CONNECTION="$LARAVEL_DATABASE_TYPE" # only used during the first initialization -LARAVEL_DATABASE_HOST="${LARAVEL_DATABASE_HOST:-"${DB_HOST:-}"}" -export LARAVEL_DATABASE_HOST="${LARAVEL_DATABASE_HOST:-mariadb}" -export DB_HOST="$LARAVEL_DATABASE_HOST" # only used during the first initialization -LARAVEL_DATABASE_PORT_NUMBER="${LARAVEL_DATABASE_PORT_NUMBER:-"${DB_PORT:-}"}" -export LARAVEL_DATABASE_PORT_NUMBER="${LARAVEL_DATABASE_PORT_NUMBER:-3306}" -export DB_PORT="$LARAVEL_DATABASE_PORT_NUMBER" # only used during the first initialization -LARAVEL_DATABASE_NAME="${LARAVEL_DATABASE_NAME:-"${DB_DATABASE:-}"}" -export LARAVEL_DATABASE_NAME="${LARAVEL_DATABASE_NAME:-bitnami_myapp}" -export DB_DATABASE="$LARAVEL_DATABASE_NAME" # only used during the first initialization -LARAVEL_DATABASE_USER="${LARAVEL_DATABASE_USER:-"${DB_USERNAME:-}"}" -export LARAVEL_DATABASE_USER="${LARAVEL_DATABASE_USER:-bn_myapp}" -export DB_USERNAME="$LARAVEL_DATABASE_USER" # only used during the first initialization -LARAVEL_DATABASE_PASSWORD="${LARAVEL_DATABASE_PASSWORD:-"${DB_PASSWORD:-}"}" -export LARAVEL_DATABASE_PASSWORD="${LARAVEL_DATABASE_PASSWORD:-}" -export DB_PASSWORD="$LARAVEL_DATABASE_PASSWORD" # only used during the first initialization - -# Custom environment variables may be defined below diff --git a/openshift/scripts/liblaravel.sh b/openshift/scripts/liblaravel.sh deleted file mode 100644 index ce7364c..0000000 --- a/openshift/scripts/liblaravel.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -laravel_validate() { - info "Validating settings in LARAVEL_* environment variables..." - local error_code=0 - - # Auxiliary functions - print_validation_error() { - error "$1" - error_code=1 - } - check_empty_value() { - if is_empty_value "${!1}"; then - print_validation_error "${1} must be set" - fi - } - check_yes_no_value() { - if ! is_yes_no_value "${!1}" && ! is_true_false_value "${!1}"; then - print_validation_error "The allowed values for ${1} are: yes no" - fi - } - check_resolved_hostname() { - if ! is_hostname_resolved "$1"; then - warn "Hostname ${1} could not be resolved, this could lead to connection issues" - fi - } - check_valid_port() { - local port_var="${1:?missing port variable}" - local err - if ! err="$(validate_port "${!port_var}")"; then - print_validation_error "An invalid port was specified in the environment variable ${port_var}: ${err}." - fi - } - - # Validate user inputs - check_yes_no_value "LARAVEL_SKIP_COMPOSER_UPDATE" - check_yes_no_value "LARAVEL_SKIP_DATABASE" - - # Database configuration validations - check_resolved_hostname "$LARAVEL_DATABASE_HOST" - check_valid_port "LARAVEL_DATABASE_PORT_NUMBER" - - return "$error_code" -} diff --git a/openshift/scripts/liblog.sh b/openshift/scripts/liblog.sh deleted file mode 100644 index c9cf469..0000000 --- a/openshift/scripts/liblog.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/bash -# Copyright Broadcom, Inc. All Rights Reserved. -# SPDX-License-Identifier: APACHE-2.0 -# -# Library for logging functions - -# Constants -RESET='\033[0m' -RED='\033[38;5;1m' -GREEN='\033[38;5;2m' -YELLOW='\033[38;5;3m' -MAGENTA='\033[38;5;5m' -CYAN='\033[38;5;6m' - -# Functions - -######################## -# Print to STDERR -# Arguments: -# Message to print -# Returns: -# None -######################### -stderr_print() { - # 'is_boolean_yes' is defined in libvalidations.sh, but depends on this file so we cannot source it - local bool="${BITNAMI_QUIET:-false}" - # comparison is performed without regard to the case of alphabetic characters - shopt -s nocasematch - if ! [[ "$bool" = 1 || "$bool" =~ ^(yes|true)$ ]]; then - printf "%b\\n" "${*}" >&2 - fi -} - -######################## -# Log message -# Arguments: -# Message to log -# Returns: -# None -######################### -log() { - stderr_print "${CYAN}${MODULE:-} ${MAGENTA}$(date "+%T.%2N ")${RESET}${*}" -} -######################## -# Log an 'info' message -# Arguments: -# Message to log -# Returns: -# None -######################### -info() { - log "${GREEN}INFO ${RESET} ==> ${*}" -} -######################## -# Log message -# Arguments: -# Message to log -# Returns: -# None -######################### -warn() { - log "${YELLOW}WARN ${RESET} ==> ${*}" -} -######################## -# Log an 'error' message -# Arguments: -# Message to log -# Returns: -# None -######################### -error() { - log "${RED}ERROR${RESET} ==> ${*}" -} -######################## -# Log a 'debug' message -# Globals: -# BITNAMI_DEBUG -# Arguments: -# None -# Returns: -# None -######################### -debug() { - # 'is_boolean_yes' is defined in libvalidations.sh, but depends on this file so we cannot source it - local bool="${BITNAMI_DEBUG:-false}" - # comparison is performed without regard to the case of alphabetic characters - shopt -s nocasematch - if [[ "$bool" = 1 || "$bool" =~ ^(yes|true)$ ]]; then - log "${MAGENTA}DEBUG${RESET} ==> ${*}" - fi -} - -######################## -# Indent a string -# Arguments: -# $1 - string -# $2 - number of indentation characters (default: 4) -# $3 - indentation character (default: " ") -# Returns: -# None -######################### -#indent() { -# local string="${1:-}" -# local num="${2:?missing num}" -# local char="${3:-" "}" -# # Build the indentation unit string -# local indent_unit="" -# for ((i = 0; i < num; i++)); do -# indent_unit="${indent_unit}${char}" -# done -# # shellcheck disable=SC2001 -# # Complex regex, see https://github.com/koalaman/shellcheck/wiki/SC2001#exceptions -# echo "$string" | sed "s/^/${indent_unit}/" -#} diff --git a/openshift/scripts/libvalidations.sh b/openshift/scripts/libvalidations.sh deleted file mode 100644 index b4084bb..0000000 --- a/openshift/scripts/libvalidations.sh +++ /dev/null @@ -1,304 +0,0 @@ -#!/bin/bash -# Copyright Broadcom, Inc. All Rights Reserved. -# SPDX-License-Identifier: APACHE-2.0 -# -# Validation functions library - -# shellcheck disable=SC1091,SC2086 - -# Load Generic Libraries -. /opt/bitnami/scripts/liblog.sh - -# Functions - -######################## -# Check if the provided argument is an integer -# Arguments: -# $1 - Value to check -# Returns: -# Boolean -######################### -is_int() { - local -r int="${1:?missing value}" - if [[ "$int" =~ ^-?[0-9]+ ]]; then - true - else - false - fi -} - -######################## -# Check if the provided argument is a positive integer -# Arguments: -# $1 - Value to check -# Returns: -# Boolean -######################### -is_positive_int() { - local -r int="${1:?missing value}" - if is_int "$int" && (( "${int}" >= 0 )); then - true - else - false - fi -} - -######################## -# Check if the provided argument is a boolean or is the string 'yes/true' -# Arguments: -# $1 - Value to check -# Returns: -# Boolean -######################### -is_boolean_yes() { - local -r bool="${1:-}" - # comparison is performed without regard to the case of alphabetic characters - shopt -s nocasematch - if [[ "$bool" = 1 || "$bool" =~ ^(yes|true)$ ]]; then - true - else - false - fi -} - -######################## -# Check if the provided argument is a boolean yes/no value -# Arguments: -# $1 - Value to check -# Returns: -# Boolean -######################### -is_yes_no_value() { - local -r bool="${1:-}" - if [[ "$bool" =~ ^(yes|no)$ ]]; then - true - else - false - fi -} - -######################## -# Check if the provided argument is a boolean true/false value -# Arguments: -# $1 - Value to check -# Returns: -# Boolean -######################### -is_true_false_value() { - local -r bool="${1:-}" - if [[ "$bool" =~ ^(true|false)$ ]]; then - true - else - false - fi -} - -######################## -# Check if the provided argument is a boolean 1/0 value -# Arguments: -# $1 - Value to check -# Returns: -# Boolean -######################### -is_1_0_value() { - local -r bool="${1:-}" - if [[ "$bool" =~ ^[10]$ ]]; then - true - else - false - fi -} - -######################## -# Check if the provided argument is an empty string or not defined -# Arguments: -# $1 - Value to check -# Returns: -# Boolean -######################### -is_empty_value() { - local -r val="${1:-}" - if [[ -z "$val" ]]; then - true - else - false - fi -} - -######################## -# Validate if the provided argument is a valid port -# Arguments: -# $1 - Port to validate -# Returns: -# Boolean and error message -######################### -validate_port() { - local value - local unprivileged=0 - - # Parse flags - while [[ "$#" -gt 0 ]]; do - case "$1" in - -unprivileged) - unprivileged=1 - ;; - --) - shift - break - ;; - -*) - stderr_print "unrecognized flag $1" - return 1 - ;; - *) - break - ;; - esac - shift - done - - if [[ "$#" -gt 1 ]]; then - echo "too many arguments provided" - return 2 - elif [[ "$#" -eq 0 ]]; then - stderr_print "missing port argument" - return 1 - else - value=$1 - fi - - if [[ -z "$value" ]]; then - echo "the value is empty" - return 1 - else - if ! is_int "$value"; then - echo "value is not an integer" - return 2 - elif [[ "$value" -lt 0 ]]; then - echo "negative value provided" - return 2 - elif [[ "$value" -gt 65535 ]]; then - echo "requested port is greater than 65535" - return 2 - elif [[ "$unprivileged" = 1 && "$value" -lt 1024 ]]; then - echo "privileged port requested" - return 3 - fi - fi -} - -######################## -# Validate if the provided argument is a valid IPv6 address -# Arguments: -# $1 - IP to validate -# Returns: -# Boolean -######################### -validate_ipv6() { - local ip="${1:?ip is missing}" - local stat=1 - local full_address_regex='^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$' - local short_address_regex='^((([0-9a-fA-F]{1,4}:){0,6}[0-9a-fA-F]{1,4}){0,6}::(([0-9a-fA-F]{1,4}:){0,6}[0-9a-fA-F]{1,4}){0,6})$' - - if [[ $ip =~ $full_address_regex || $ip =~ $short_address_regex || $ip == "::" ]]; then - stat=0 - fi - return $stat -} - -######################## -# Validate if the provided argument is a valid IPv4 address -# Arguments: -# $1 - IP to validate -# Returns: -# Boolean -######################### -validate_ipv4() { - local ip="${1:?ip is missing}" - local stat=1 - - if [[ $ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then - read -r -a ip_array <<< "$(tr '.' ' ' <<< "$ip")" - [[ ${ip_array[0]} -le 255 && ${ip_array[1]} -le 255 \ - && ${ip_array[2]} -le 255 && ${ip_array[3]} -le 255 ]] - stat=$? - fi - return $stat -} - -######################## -# Validate if the provided argument is a valid IPv4 or IPv6 address -# Arguments: -# $1 - IP to validate -# Returns: -# Boolean -######################### -validate_ip() { - local ip="${1:?ip is missing}" - local stat=1 - - if validate_ipv4 "$ip"; then - stat=0 - else - stat=$(validate_ipv6 "$ip") - fi - return $stat -} - -######################## -# Validate a string format -# Arguments: -# $1 - String to validate -# Returns: -# Boolean -######################### -validate_string() { - local string - local min_length=-1 - local max_length=-1 - - # Parse flags - while [ "$#" -gt 0 ]; do - case "$1" in - -min-length) - shift - min_length=${1:-} - ;; - -max-length) - shift - max_length=${1:-} - ;; - --) - shift - break - ;; - -*) - stderr_print "unrecognized flag $1" - return 1 - ;; - *) - break - ;; - esac - shift - done - - if [ "$#" -gt 1 ]; then - stderr_print "too many arguments provided" - return 2 - elif [ "$#" -eq 0 ]; then - stderr_print "missing string" - return 1 - else - string=$1 - fi - - if [[ "$min_length" -ge 0 ]] && [[ "${#string}" -lt "$min_length" ]]; then - echo "string length is less than $min_length" - return 1 - fi - if [[ "$max_length" -ge 0 ]] && [[ "${#string}" -gt "$max_length" ]]; then - echo "string length is great than $max_length" - return 1 - fi -} diff --git a/openshift/scripts/setup.sh b/openshift/scripts/setup.sh deleted file mode 100755 index bc5e394..0000000 --- a/openshift/scripts/setup.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -echo "⭐️ Load Laravel Setup"; -# Load libraries -. /var/www/openshift/scripts/libvalidations.sh -. /var/www/openshift/scripts/liblaravel.sh - -# Load Laravel environment -. /var/www/openshift/scripts/laravel-env.sh -. /var/www/openshift/scripts/liblog.sh - -# Ensure Laravel environment variables are valid -laravel_validate - - diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index c2c3243..3353350 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -38,13 +38,6 @@
- -
-
- -
-
-
From 5389844cef6c05c3ca82e35d74a4e2bf3031ab27 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Tue, 25 Jun 2024 17:07:16 +0200 Subject: [PATCH 58/78] Added basepackge fixed some nginx issues in the docker container. Added same basic functionality for testing. --- app/Http/Helpers.php | 137 +++ app/Models/Role.php | 38 + composer.json | 14 +- composer.lock | 991 +++++++++++++----- .../2014_10_12_000000_create_users_table.php | 32 - .../2022_11_04_000100_create_roles_table.php | 40 + database/seeders/DatabaseSeeder.php | 30 +- docker-compose.yml | 6 +- docker/docker.env | 7 +- docker/vhost.conf | 8 + resources/lang/nl/auth.php | 20 + resources/lang/nl/pagination.php | 19 + resources/lang/nl/passwords.php | 22 + resources/lang/nl/validation.php | 191 ++++ resources/views/layouts/app.blade.php | 42 + resources/views/layouts/nav.blade.php | 114 ++ resources/views/welcome.blade.php | 144 +-- vite.config.js | 13 + 18 files changed, 1425 insertions(+), 443 deletions(-) create mode 100644 app/Http/Helpers.php create mode 100644 app/Models/Role.php delete mode 100644 database/migrations/2014_10_12_000000_create_users_table.php create mode 100644 database/migrations/2022_11_04_000100_create_roles_table.php create mode 100644 resources/lang/nl/auth.php create mode 100644 resources/lang/nl/pagination.php create mode 100644 resources/lang/nl/passwords.php create mode 100644 resources/lang/nl/validation.php create mode 100644 resources/views/layouts/app.blade.php create mode 100644 resources/views/layouts/nav.blade.php diff --git a/app/Http/Helpers.php b/app/Http/Helpers.php new file mode 100644 index 0000000..d98c4ee --- /dev/null +++ b/app/Http/Helpers.php @@ -0,0 +1,137 @@ +'; + } + + return $print; + } +} + +//if (! function_exists('compareVariables')) { +// function compareVariables($value1, $operator, $value2): string +// { +// switch ($operator) { +// case '<': +// return $value1 < $value2; +// case '<=': +// return $value1 <= $value2; +// case '>': +// return $value1 > $value2; +// case '>=': +// return $value1 >= $value2; +// case '==': +// return $value1 == $value2; +// case '!=': +// return $value1 != $value2; +// default: +// return false; +// } +// } +//} diff --git a/app/Models/Role.php b/app/Models/Role.php new file mode 100644 index 0000000..ccd66d0 --- /dev/null +++ b/app/Models/Role.php @@ -0,0 +1,38 @@ +hasMany(User::class); + } +} diff --git a/composer.json b/composer.json index 52ef45c..fb5fd15 100644 --- a/composer.json +++ b/composer.json @@ -4,13 +4,20 @@ "description": "The skeleton application for the Laravel framework.", "keywords": ["laravel", "framework"], "license": "MIT", + "repositories": [ + { + "type": "vcs", + "url": "git@github.com:UtrechtUniversity/HTS-AppTeam-LaravelBase.git" + } + ], "require": { "php": "^8.1", "doctrine/dbal": "^3.8", "guzzlehttp/guzzle": "^7.2", "laravel/framework": "^10.10", "laravel/sanctum": "^3.3", - "laravel/tinker": "^2.8" + "laravel/tinker": "^2.8", + "utrecht_university/hts_appteam_laravelbase": "^2.0" }, "require-dev": { "fakerphp/faker": "^1.9.1", @@ -26,7 +33,10 @@ "App\\": "app/", "Database\\Factories\\": "database/factories/", "Database\\Seeders\\": "database/seeders/" - } + }, + "files": [ + "app/Http/Helpers.php" + ] }, "autoload-dev": { "psr-4": { diff --git a/composer.lock b/composer.lock index be6a4d7..51743df 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "41be7053117aa17db65c61cf8d2d38fe", + "content-hash": "73d24f532c746afdb6bab00cb402eeb7", "packages": [ { "name": "brick/math", @@ -1394,18 +1394,60 @@ ], "time": "2023-12-03T19:50:20+00:00" }, + { + "name": "jumbojett/openid-connect-php", + "version": "v0.9.10", + "source": { + "type": "git", + "url": "https://github.com/jumbojett/OpenID-Connect-PHP.git", + "reference": "45aac47b525f0483dd4db3324bb1f1cab4666061" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jumbojett/OpenID-Connect-PHP/zipball/45aac47b525f0483dd4db3324bb1f1cab4666061", + "reference": "45aac47b525f0483dd4db3324bb1f1cab4666061", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "paragonie/random_compat": ">=2", + "php": ">=5.4", + "phpseclib/phpseclib": "~2.0 || ^3.0" + }, + "require-dev": { + "roave/security-advisories": "dev-master", + "yoast/phpunit-polyfills": "^1.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "description": "Bare-bones OpenID Connect client", + "support": { + "issues": "https://github.com/jumbojett/OpenID-Connect-PHP/issues", + "source": "https://github.com/jumbojett/OpenID-Connect-PHP/tree/v0.9.10" + }, + "time": "2022-09-30T12:34:46+00:00" + }, { "name": "laravel/framework", - "version": "v10.48.10", + "version": "v10.48.14", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "91e2b9e218afa4e5c377510faa11957042831ba3" + "reference": "27cb4736bb7e60a5311ec73160068dfbcf98336b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/91e2b9e218afa4e5c377510faa11957042831ba3", - "reference": "91e2b9e218afa4e5c377510faa11957042831ba3", + "url": "https://api.github.com/repos/laravel/framework/zipball/27cb4736bb7e60a5311ec73160068dfbcf98336b", + "reference": "27cb4736bb7e60a5311ec73160068dfbcf98336b", "shasum": "" }, "require": { @@ -1599,20 +1641,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-04-30T12:52:59+00:00" + "time": "2024-06-21T10:06:42+00:00" }, { "name": "laravel/prompts", - "version": "v0.1.21", + "version": "v0.1.24", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "23ea808e8a145653e0ab29e30d4385e49f40a920" + "reference": "409b0b4305273472f3754826e68f4edbd0150149" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/23ea808e8a145653e0ab29e30d4385e49f40a920", - "reference": "23ea808e8a145653e0ab29e30d4385e49f40a920", + "url": "https://api.github.com/repos/laravel/prompts/zipball/409b0b4305273472f3754826e68f4edbd0150149", + "reference": "409b0b4305273472f3754826e68f4edbd0150149", "shasum": "" }, "require": { @@ -1655,9 +1697,9 @@ "description": "Add beautiful and user-friendly forms to your command-line applications.", "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.1.21" + "source": "https://github.com/laravel/prompts/tree/v0.1.24" }, - "time": "2024-04-30T12:46:16+00:00" + "time": "2024-06-17T13:58:22+00:00" }, { "name": "laravel/sanctum", @@ -1851,6 +1893,69 @@ }, "time": "2024-01-04T16:10:04+00:00" }, + { + "name": "laravel/ui", + "version": "v4.5.2", + "source": { + "type": "git", + "url": "https://github.com/laravel/ui.git", + "reference": "c75396f63268c95b053c8e4814eb70e0875e9628" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/ui/zipball/c75396f63268c95b053c8e4814eb70e0875e9628", + "reference": "c75396f63268c95b053c8e4814eb70e0875e9628", + "shasum": "" + }, + "require": { + "illuminate/console": "^9.21|^10.0|^11.0", + "illuminate/filesystem": "^9.21|^10.0|^11.0", + "illuminate/support": "^9.21|^10.0|^11.0", + "illuminate/validation": "^9.21|^10.0|^11.0", + "php": "^8.0", + "symfony/console": "^6.0|^7.0" + }, + "require-dev": { + "orchestra/testbench": "^7.35|^8.15|^9.0", + "phpunit/phpunit": "^9.3|^10.4|^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Ui\\UiServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Ui\\": "src/", + "Illuminate\\Foundation\\Auth\\": "auth-backend/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Laravel UI utilities and presets.", + "keywords": [ + "laravel", + "ui" + ], + "support": { + "source": "https://github.com/laravel/ui/tree/v4.5.2" + }, + "time": "2024-05-08T18:07:10+00:00" + }, { "name": "league/commonmark", "version": "2.4.2", @@ -2041,16 +2146,16 @@ }, { "name": "league/flysystem", - "version": "3.27.0", + "version": "3.28.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "4729745b1ab737908c7d055148c9a6b3e959832f" + "reference": "e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/4729745b1ab737908c7d055148c9a6b3e959832f", - "reference": "4729745b1ab737908c7d055148c9a6b3e959832f", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c", + "reference": "e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c", "shasum": "" }, "require": { @@ -2074,10 +2179,13 @@ "composer/semver": "^3.0", "ext-fileinfo": "*", "ext-ftp": "*", + "ext-mongodb": "^1.3", "ext-zip": "*", "friendsofphp/php-cs-fixer": "^3.5", "google/cloud-storage": "^1.23", + "guzzlehttp/psr7": "^2.6", "microsoft/azure-storage-blob": "^1.1", + "mongodb/mongodb": "^1.2", "phpseclib/phpseclib": "^3.0.36", "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^9.5.11|^10.0", @@ -2115,32 +2223,22 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.27.0" + "source": "https://github.com/thephpleague/flysystem/tree/3.28.0" }, - "funding": [ - { - "url": "https://ecologi.com/frankdejonge", - "type": "custom" - }, - { - "url": "https://github.com/frankdejonge", - "type": "github" - } - ], - "time": "2024-04-07T19:17:50+00:00" + "time": "2024-05-22T10:09:12+00:00" }, { "name": "league/flysystem-local", - "version": "3.25.1", + "version": "3.28.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem-local.git", - "reference": "61a6a90d6e999e4ddd9ce5adb356de0939060b92" + "reference": "13f22ea8be526ea58c2ddff9e158ef7c296e4f40" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/61a6a90d6e999e4ddd9ce5adb356de0939060b92", - "reference": "61a6a90d6e999e4ddd9ce5adb356de0939060b92", + "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/13f22ea8be526ea58c2ddff9e158ef7c296e4f40", + "reference": "13f22ea8be526ea58c2ddff9e158ef7c296e4f40", "shasum": "" }, "require": { @@ -2174,19 +2272,9 @@ "local" ], "support": { - "source": "https://github.com/thephpleague/flysystem-local/tree/3.25.1" + "source": "https://github.com/thephpleague/flysystem-local/tree/3.28.0" }, - "funding": [ - { - "url": "https://ecologi.com/frankdejonge", - "type": "custom" - }, - { - "url": "https://github.com/frankdejonge", - "type": "github" - } - ], - "time": "2024-03-15T19:58:44+00:00" + "time": "2024-05-06T20:05:52+00:00" }, { "name": "league/mime-type-detection", @@ -2347,16 +2435,16 @@ }, { "name": "nesbot/carbon", - "version": "2.72.3", + "version": "2.72.5", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83" + "reference": "afd46589c216118ecd48ff2b95d77596af1e57ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/0c6fd108360c562f6e4fd1dedb8233b423e91c83", - "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/afd46589c216118ecd48ff2b95d77596af1e57ed", + "reference": "afd46589c216118ecd48ff2b95d77596af1e57ed", "shasum": "" }, "require": { @@ -2390,8 +2478,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-3.x": "3.x-dev", - "dev-master": "2.x-dev" + "dev-master": "3.x-dev", + "dev-2.x": "2.x-dev" }, "laravel": { "providers": [ @@ -2450,7 +2538,7 @@ "type": "tidelift" } ], - "time": "2024-01-25T10:35:09+00:00" + "time": "2024-06-03T19:18:41+00:00" }, { "name": "nette/schema", @@ -2744,6 +2832,123 @@ ], "time": "2023-02-08T01:06:31+00:00" }, + { + "name": "paragonie/constant_time_encoding", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/paragonie/constant_time_encoding.git", + "reference": "df1e7fde177501eee2037dd159cf04f5f301a512" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/df1e7fde177501eee2037dd159cf04f5f301a512", + "reference": "df1e7fde177501eee2037dd159cf04f5f301a512", + "shasum": "" + }, + "require": { + "php": "^8" + }, + "require-dev": { + "phpunit/phpunit": "^9", + "vimeo/psalm": "^4|^5" + }, + "type": "library", + "autoload": { + "psr-4": { + "ParagonIE\\ConstantTime\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com", + "role": "Maintainer" + }, + { + "name": "Steve 'Sc00bz' Thomas", + "email": "steve@tobtu.com", + "homepage": "https://www.tobtu.com", + "role": "Original Developer" + } + ], + "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", + "keywords": [ + "base16", + "base32", + "base32_decode", + "base32_encode", + "base64", + "base64_decode", + "base64_encode", + "bin2hex", + "encoding", + "hex", + "hex2bin", + "rfc4648" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/constant_time_encoding/issues", + "source": "https://github.com/paragonie/constant_time_encoding" + }, + "time": "2024-05-08T12:36:18+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v9.99.100", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", + "shasum": "" + }, + "require": { + "php": ">= 7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, + "time": "2020-10-15T08:29:30+00:00" + }, { "name": "phpoption/phpoption", "version": "1.9.2", @@ -2819,6 +3024,116 @@ ], "time": "2023-11-12T21:59:55+00:00" }, + { + "name": "phpseclib/phpseclib", + "version": "3.0.39", + "source": { + "type": "git", + "url": "https://github.com/phpseclib/phpseclib.git", + "reference": "211ebc399c6e73c225a018435fe5ae209d1d1485" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/211ebc399c6e73c225a018435fe5ae209d1d1485", + "reference": "211ebc399c6e73c225a018435fe5ae209d1d1485", + "shasum": "" + }, + "require": { + "paragonie/constant_time_encoding": "^1|^2|^3", + "paragonie/random_compat": "^1.4|^2.0|^9.99.99", + "php": ">=5.6.1" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "suggest": { + "ext-dom": "Install the DOM extension to load XML formatted public keys.", + "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", + "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", + "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", + "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." + }, + "type": "library", + "autoload": { + "files": [ + "phpseclib/bootstrap.php" + ], + "psr-4": { + "phpseclib3\\": "phpseclib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jim Wigginton", + "email": "terrafrost@php.net", + "role": "Lead Developer" + }, + { + "name": "Patrick Monnerat", + "email": "pm@datasphere.ch", + "role": "Developer" + }, + { + "name": "Andreas Fischer", + "email": "bantu@phpbb.com", + "role": "Developer" + }, + { + "name": "Hans-Jürgen Petrich", + "email": "petrich@tronic-media.com", + "role": "Developer" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com", + "role": "Developer" + } + ], + "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", + "homepage": "http://phpseclib.sourceforge.net", + "keywords": [ + "BigInteger", + "aes", + "asn.1", + "asn1", + "blowfish", + "crypto", + "cryptography", + "encryption", + "rsa", + "security", + "sftp", + "signature", + "signing", + "ssh", + "twofish", + "x.509", + "x509" + ], + "support": { + "issues": "https://github.com/phpseclib/phpseclib/issues", + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.39" + }, + "funding": [ + { + "url": "https://github.com/terrafrost", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpseclib", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", + "type": "tidelift" + } + ], + "time": "2024-06-24T06:27:33+00:00" + }, { "name": "psr/cache", "version": "3.0.0", @@ -3073,20 +3388,20 @@ }, { "name": "psr/http-factory", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { - "php": ">=7.0.0", + "php": ">=7.1", "psr/http-message": "^1.0 || ^2.0" }, "type": "library", @@ -3110,7 +3425,7 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "factory", "http", @@ -3122,9 +3437,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + "source": "https://github.com/php-fig/http-factory" }, - "time": "2023-04-10T20:10:41+00:00" + "time": "2024-04-15T12:06:14+00:00" }, { "name": "psr/http-message", @@ -3282,16 +3597,16 @@ }, { "name": "psy/psysh", - "version": "v0.12.3", + "version": "v0.12.4", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "b6b6cce7d3ee8fbf31843edce5e8f5a72eff4a73" + "reference": "2fd717afa05341b4f8152547f142cd2f130f6818" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/b6b6cce7d3ee8fbf31843edce5e8f5a72eff4a73", - "reference": "b6b6cce7d3ee8fbf31843edce5e8f5a72eff4a73", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/2fd717afa05341b4f8152547f142cd2f130f6818", + "reference": "2fd717afa05341b4f8152547f142cd2f130f6818", "shasum": "" }, "require": { @@ -3355,9 +3670,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.12.3" + "source": "https://github.com/bobthecow/psysh/tree/v0.12.4" }, - "time": "2024-04-02T15:57:53+00:00" + "time": "2024-06-10T01:18:23+00:00" }, { "name": "ralouphie/getallheaders", @@ -3586,16 +3901,16 @@ }, { "name": "symfony/console", - "version": "v6.4.7", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a170e64ae10d00ba89e2acbb590dc2e54da8ad8f" + "reference": "be5854cee0e8c7b110f00d695d11debdfa1a2a91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a170e64ae10d00ba89e2acbb590dc2e54da8ad8f", - "reference": "a170e64ae10d00ba89e2acbb590dc2e54da8ad8f", + "url": "https://api.github.com/repos/symfony/console/zipball/be5854cee0e8c7b110f00d695d11debdfa1a2a91", + "reference": "be5854cee0e8c7b110f00d695d11debdfa1a2a91", "shasum": "" }, "require": { @@ -3660,7 +3975,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.7" + "source": "https://github.com/symfony/console/tree/v6.4.8" }, "funding": [ { @@ -3676,20 +3991,20 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/css-selector", - "version": "v7.0.7", + "version": "v7.1.1", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "b08a4ad89e84b29cec285b7b1f781a7ae51cf4bc" + "reference": "1c7cee86c6f812896af54434f8ce29c8d94f9ff4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/b08a4ad89e84b29cec285b7b1f781a7ae51cf4bc", - "reference": "b08a4ad89e84b29cec285b7b1f781a7ae51cf4bc", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/1c7cee86c6f812896af54434f8ce29c8d94f9ff4", + "reference": "1c7cee86c6f812896af54434f8ce29c8d94f9ff4", "shasum": "" }, "require": { @@ -3725,7 +4040,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v7.0.7" + "source": "https://github.com/symfony/css-selector/tree/v7.1.1" }, "funding": [ { @@ -3741,7 +4056,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:29:19+00:00" + "time": "2024-05-31T14:57:53+00:00" }, { "name": "symfony/deprecation-contracts", @@ -3812,16 +4127,16 @@ }, { "name": "symfony/error-handler", - "version": "v6.4.7", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "667a072466c6a53827ed7b119af93806b884cbb3" + "reference": "ef836152bf13472dc5fb5b08b0c0c4cfeddc0fcc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/667a072466c6a53827ed7b119af93806b884cbb3", - "reference": "667a072466c6a53827ed7b119af93806b884cbb3", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/ef836152bf13472dc5fb5b08b0c0c4cfeddc0fcc", + "reference": "ef836152bf13472dc5fb5b08b0c0c4cfeddc0fcc", "shasum": "" }, "require": { @@ -3867,7 +4182,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.4.7" + "source": "https://github.com/symfony/error-handler/tree/v6.4.8" }, "funding": [ { @@ -3883,20 +4198,20 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v7.0.7", + "version": "v7.1.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "db2a7fab994d67d92356bb39c367db115d9d30f9" + "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/db2a7fab994d67d92356bb39c367db115d9d30f9", - "reference": "db2a7fab994d67d92356bb39c367db115d9d30f9", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7", + "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7", "shasum": "" }, "require": { @@ -3947,7 +4262,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.0.7" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.1.1" }, "funding": [ { @@ -3963,7 +4278,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:29:19+00:00" + "time": "2024-05-31T14:57:53+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -4043,16 +4358,16 @@ }, { "name": "symfony/finder", - "version": "v6.4.7", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "511c48990be17358c23bf45c5d71ab85d40fb764" + "reference": "3ef977a43883215d560a2cecb82ec8e62131471c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/511c48990be17358c23bf45c5d71ab85d40fb764", - "reference": "511c48990be17358c23bf45c5d71ab85d40fb764", + "url": "https://api.github.com/repos/symfony/finder/zipball/3ef977a43883215d560a2cecb82ec8e62131471c", + "reference": "3ef977a43883215d560a2cecb82ec8e62131471c", "shasum": "" }, "require": { @@ -4087,7 +4402,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.4.7" + "source": "https://github.com/symfony/finder/tree/v6.4.8" }, "funding": [ { @@ -4103,20 +4418,20 @@ "type": "tidelift" } ], - "time": "2024-04-23T10:36:43+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/http-foundation", - "version": "v6.4.7", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "b4db6b833035477cb70e18d0ae33cb7c2b521759" + "reference": "27de8cc95e11db7a50b027e71caaab9024545947" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b4db6b833035477cb70e18d0ae33cb7c2b521759", - "reference": "b4db6b833035477cb70e18d0ae33cb7c2b521759", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/27de8cc95e11db7a50b027e71caaab9024545947", + "reference": "27de8cc95e11db7a50b027e71caaab9024545947", "shasum": "" }, "require": { @@ -4164,7 +4479,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.4.7" + "source": "https://github.com/symfony/http-foundation/tree/v6.4.8" }, "funding": [ { @@ -4180,20 +4495,20 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.4.7", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "b7b5e6cdef670a0c82d015a966ffc7e855861a98" + "reference": "6c519aa3f32adcfd1d1f18d923f6b227d9acf3c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/b7b5e6cdef670a0c82d015a966ffc7e855861a98", - "reference": "b7b5e6cdef670a0c82d015a966ffc7e855861a98", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/6c519aa3f32adcfd1d1f18d923f6b227d9acf3c1", + "reference": "6c519aa3f32adcfd1d1f18d923f6b227d9acf3c1", "shasum": "" }, "require": { @@ -4278,7 +4593,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.4.7" + "source": "https://github.com/symfony/http-kernel/tree/v6.4.8" }, "funding": [ { @@ -4294,20 +4609,20 @@ "type": "tidelift" } ], - "time": "2024-04-29T11:24:44+00:00" + "time": "2024-06-02T16:06:25+00:00" }, { "name": "symfony/mailer", - "version": "v6.4.7", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "2c446d4e446995bed983c0b5bb9ff837e8de7dbd" + "reference": "76326421d44c07f7824b19487cfbf87870b37efc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/2c446d4e446995bed983c0b5bb9ff837e8de7dbd", - "reference": "2c446d4e446995bed983c0b5bb9ff837e8de7dbd", + "url": "https://api.github.com/repos/symfony/mailer/zipball/76326421d44c07f7824b19487cfbf87870b37efc", + "reference": "76326421d44c07f7824b19487cfbf87870b37efc", "shasum": "" }, "require": { @@ -4358,7 +4673,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v6.4.7" + "source": "https://github.com/symfony/mailer/tree/v6.4.8" }, "funding": [ { @@ -4374,20 +4689,20 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/mime", - "version": "v6.4.7", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "decadcf3865918ecfcbfa90968553994ce935a5e" + "reference": "618597ab8b78ac86d1c75a9d0b35540cda074f33" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/decadcf3865918ecfcbfa90968553994ce935a5e", - "reference": "decadcf3865918ecfcbfa90968553994ce935a5e", + "url": "https://api.github.com/repos/symfony/mime/zipball/618597ab8b78ac86d1c75a9d0b35540cda074f33", + "reference": "618597ab8b78ac86d1c75a9d0b35540cda074f33", "shasum": "" }, "require": { @@ -4443,7 +4758,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.4.7" + "source": "https://github.com/symfony/mime/tree/v6.4.8" }, "funding": [ { @@ -4459,20 +4774,20 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-06-01T07:50:16+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" + "reference": "0424dff1c58f028c451efff2045f5d92410bd540" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", + "reference": "0424dff1c58f028c451efff2045f5d92410bd540", "shasum": "" }, "require": { @@ -4522,7 +4837,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" }, "funding": [ { @@ -4538,20 +4853,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" + "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", - "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/64647a7c30b2283f5d49b874d84a18fc22054b7a", + "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a", "shasum": "" }, "require": { @@ -4600,7 +4915,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.30.0" }, "funding": [ { @@ -4616,20 +4931,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "a287ed7475f85bf6f61890146edbc932c0fff919" + "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a287ed7475f85bf6f61890146edbc932c0fff919", - "reference": "a287ed7475f85bf6f61890146edbc932c0fff919", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", + "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", "shasum": "" }, "require": { @@ -4684,7 +4999,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.30.0" }, "funding": [ { @@ -4700,20 +5015,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" + "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", - "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/a95281b0be0d9ab48050ebd988b967875cdb9fdb", + "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb", "shasum": "" }, "require": { @@ -4765,7 +5080,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.30.0" }, "funding": [ { @@ -4781,20 +5096,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", "shasum": "" }, "require": { @@ -4845,7 +5160,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" }, "funding": [ { @@ -4861,20 +5176,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25" + "reference": "10112722600777e02d2745716b70c5db4ca70442" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/861391a8da9a04cbad2d232ddd9e4893220d6e25", - "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/10112722600777e02d2745716b70c5db4ca70442", + "reference": "10112722600777e02d2745716b70c5db4ca70442", "shasum": "" }, "require": { @@ -4918,7 +5233,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.30.0" }, "funding": [ { @@ -4934,20 +5249,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", "shasum": "" }, "require": { @@ -4998,7 +5313,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" }, "funding": [ { @@ -5014,25 +5329,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-php83", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php83.git", - "reference": "86fcae159633351e5fd145d1c47de6c528f8caff" + "reference": "dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/86fcae159633351e5fd145d1c47de6c528f8caff", - "reference": "86fcae159633351e5fd145d1c47de6c528f8caff", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9", + "reference": "dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9", "shasum": "" }, "require": { - "php": ">=7.1", - "symfony/polyfill-php80": "^1.14" + "php": ">=7.1" }, "type": "library", "extra": { @@ -5075,7 +5389,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.30.0" }, "funding": [ { @@ -5091,20 +5405,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-06-19T12:35:24+00:00" }, { "name": "symfony/polyfill-uuid", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-uuid.git", - "reference": "3abdd21b0ceaa3000ee950097bc3cf9efc137853" + "reference": "2ba1f33797470debcda07fe9dce20a0003df18e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/3abdd21b0ceaa3000ee950097bc3cf9efc137853", - "reference": "3abdd21b0ceaa3000ee950097bc3cf9efc137853", + "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/2ba1f33797470debcda07fe9dce20a0003df18e9", + "reference": "2ba1f33797470debcda07fe9dce20a0003df18e9", "shasum": "" }, "require": { @@ -5154,7 +5468,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/polyfill-uuid/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-uuid/tree/v1.30.0" }, "funding": [ { @@ -5170,20 +5484,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/process", - "version": "v6.4.7", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "cdb1c81c145fd5aa9b0038bab694035020943381" + "reference": "8d92dd79149f29e89ee0f480254db595f6a6a2c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/cdb1c81c145fd5aa9b0038bab694035020943381", - "reference": "cdb1c81c145fd5aa9b0038bab694035020943381", + "url": "https://api.github.com/repos/symfony/process/zipball/8d92dd79149f29e89ee0f480254db595f6a6a2c5", + "reference": "8d92dd79149f29e89ee0f480254db595f6a6a2c5", "shasum": "" }, "require": { @@ -5215,7 +5529,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.4.7" + "source": "https://github.com/symfony/process/tree/v6.4.8" }, "funding": [ { @@ -5231,20 +5545,20 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/routing", - "version": "v6.4.7", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "276e06398f71fa2a973264d94f28150f93cfb907" + "reference": "8a40d0f9b01f0fbb80885d3ce0ad6714fb603a58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/276e06398f71fa2a973264d94f28150f93cfb907", - "reference": "276e06398f71fa2a973264d94f28150f93cfb907", + "url": "https://api.github.com/repos/symfony/routing/zipball/8a40d0f9b01f0fbb80885d3ce0ad6714fb603a58", + "reference": "8a40d0f9b01f0fbb80885d3ce0ad6714fb603a58", "shasum": "" }, "require": { @@ -5298,7 +5612,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.4.7" + "source": "https://github.com/symfony/routing/tree/v6.4.8" }, "funding": [ { @@ -5314,7 +5628,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/service-contracts", @@ -5401,16 +5715,16 @@ }, { "name": "symfony/string", - "version": "v7.0.7", + "version": "v7.1.1", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "e405b5424dc2528e02e31ba26b83a79fd4eb8f63" + "reference": "60bc311c74e0af215101235aa6f471bcbc032df2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/e405b5424dc2528e02e31ba26b83a79fd4eb8f63", - "reference": "e405b5424dc2528e02e31ba26b83a79fd4eb8f63", + "url": "https://api.github.com/repos/symfony/string/zipball/60bc311c74e0af215101235aa6f471bcbc032df2", + "reference": "60bc311c74e0af215101235aa6f471bcbc032df2", "shasum": "" }, "require": { @@ -5424,6 +5738,7 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { + "symfony/emoji": "^7.1", "symfony/error-handler": "^6.4|^7.0", "symfony/http-client": "^6.4|^7.0", "symfony/intl": "^6.4|^7.0", @@ -5467,7 +5782,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.0.7" + "source": "https://github.com/symfony/string/tree/v7.1.1" }, "funding": [ { @@ -5483,20 +5798,20 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:29:19+00:00" + "time": "2024-06-04T06:40:14+00:00" }, { "name": "symfony/translation", - "version": "v6.4.7", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "7495687c58bfd88b7883823747b0656d90679123" + "reference": "a002933b13989fc4bd0b58e04bf7eec5210e438a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/7495687c58bfd88b7883823747b0656d90679123", - "reference": "7495687c58bfd88b7883823747b0656d90679123", + "url": "https://api.github.com/repos/symfony/translation/zipball/a002933b13989fc4bd0b58e04bf7eec5210e438a", + "reference": "a002933b13989fc4bd0b58e04bf7eec5210e438a", "shasum": "" }, "require": { @@ -5562,7 +5877,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.4.7" + "source": "https://github.com/symfony/translation/tree/v6.4.8" }, "funding": [ { @@ -5578,7 +5893,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/translation-contracts", @@ -5660,16 +5975,16 @@ }, { "name": "symfony/uid", - "version": "v6.4.7", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/uid.git", - "reference": "a66efcb71d8bc3a207d9d78e0bd67f3321510355" + "reference": "35904eca37a84bb764c560cbfcac9f0ac2bcdbdf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/uid/zipball/a66efcb71d8bc3a207d9d78e0bd67f3321510355", - "reference": "a66efcb71d8bc3a207d9d78e0bd67f3321510355", + "url": "https://api.github.com/repos/symfony/uid/zipball/35904eca37a84bb764c560cbfcac9f0ac2bcdbdf", + "reference": "35904eca37a84bb764c560cbfcac9f0ac2bcdbdf", "shasum": "" }, "require": { @@ -5714,7 +6029,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/uid/tree/v6.4.7" + "source": "https://github.com/symfony/uid/tree/v6.4.8" }, "funding": [ { @@ -5730,20 +6045,20 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.4.7", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "7a9cd977cd1c5fed3694bee52990866432af07d7" + "reference": "ad23ca4312395f0a8a8633c831ef4c4ee542ed25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/7a9cd977cd1c5fed3694bee52990866432af07d7", - "reference": "7a9cd977cd1c5fed3694bee52990866432af07d7", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/ad23ca4312395f0a8a8633c831ef4c4ee542ed25", + "reference": "ad23ca4312395f0a8a8633c831ef4c4ee542ed25", "shasum": "" }, "require": { @@ -5799,7 +6114,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.4.7" + "source": "https://github.com/symfony/var-dumper/tree/v6.4.8" }, "funding": [ { @@ -5815,7 +6130,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -5870,6 +6185,64 @@ }, "time": "2023-12-08T13:03:43+00:00" }, + { + "name": "utrecht_university/hts_appteam_laravelbase", + "version": "v2.4.8", + "source": { + "type": "git", + "url": "git@github.com:UtrechtUniversity/HTS-AppTeam-LaravelBase.git", + "reference": "1669f8af62eaa509797498b426c6814d04606f8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/UtrechtUniversity/HTS-AppTeam-LaravelBase/zipball/1669f8af62eaa509797498b426c6814d04606f8a", + "reference": "1669f8af62eaa509797498b426c6814d04606f8a", + "shasum": "" + }, + "require": { + "ext-json": "*", + "jumbojett/openid-connect-php": "^0.9.7", + "laravel/framework": "^8.0|^9.0|^10.0", + "laravel/ui": "^3.0|^4.0", + "php": ">=7.3" + }, + "require-dev": { + "phpmd/phpmd": "@stable", + "phpunit/phpunit": "^9.0", + "squizlabs/php_codesniffer": "^3.6" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "UU\\HTSAppTeam\\LaravelBase\\Providers\\AppTeamServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "UU\\HTSAppTeam\\LaravelBase\\": "src/" + } + }, + "authors": [ + { + "name": "Gerbrand Sterrenburg-Buijs", + "homepage": "https://www.uu.nl/" + } + ], + "description": "A Laravel Base package for the HTS AppTeam", + "homepage": "https://github.com/UtrechtUniversity/HTS-AppTeam-LaravelBase", + "keywords": [ + "hts", + "laravel", + "php" + ], + "support": { + "source": "https://github.com/UtrechtUniversity/HTS-AppTeam-LaravelBase/tree/v2.4.8", + "issues": "https://github.com/UtrechtUniversity/HTS-AppTeam-LaravelBase/issues" + }, + "time": "2024-01-08T14:58:23+00:00" + }, { "name": "vlucas/phpdotenv", "version": "v5.6.0", @@ -6275,16 +6648,16 @@ }, { "name": "laravel/pint", - "version": "v1.15.3", + "version": "v1.16.1", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "3600b5d17aff52f6100ea4921849deacbbeb8656" + "reference": "9266a47f1b9231b83e0cfd849009547329d871b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/3600b5d17aff52f6100ea4921849deacbbeb8656", - "reference": "3600b5d17aff52f6100ea4921849deacbbeb8656", + "url": "https://api.github.com/repos/laravel/pint/zipball/9266a47f1b9231b83e0cfd849009547329d871b1", + "reference": "9266a47f1b9231b83e0cfd849009547329d871b1", "shasum": "" }, "require": { @@ -6295,13 +6668,13 @@ "php": "^8.1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.54.0", - "illuminate/view": "^10.48.8", - "larastan/larastan": "^2.9.5", - "laravel-zero/framework": "^10.3.0", - "mockery/mockery": "^1.6.11", + "friendsofphp/php-cs-fixer": "^3.59.3", + "illuminate/view": "^10.48.12", + "larastan/larastan": "^2.9.7", + "laravel-zero/framework": "^10.4.0", + "mockery/mockery": "^1.6.12", "nunomaduro/termwind": "^1.15.1", - "pestphp/pest": "^2.34.7" + "pestphp/pest": "^2.34.8" }, "bin": [ "builds/pint" @@ -6337,20 +6710,20 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2024-04-30T15:02:26+00:00" + "time": "2024-06-18T16:50:05+00:00" }, { "name": "laravel/sail", - "version": "v1.29.1", + "version": "v1.29.3", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "8be4a31150eab3b46af11a2e7b2c4632eefaad7e" + "reference": "e35b3ffe1b9ea598246d7e99197ee8799f6dc2e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/8be4a31150eab3b46af11a2e7b2c4632eefaad7e", - "reference": "8be4a31150eab3b46af11a2e7b2c4632eefaad7e", + "url": "https://api.github.com/repos/laravel/sail/zipball/e35b3ffe1b9ea598246d7e99197ee8799f6dc2e5", + "reference": "e35b3ffe1b9ea598246d7e99197ee8799f6dc2e5", "shasum": "" }, "require": { @@ -6400,20 +6773,20 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2024-03-20T20:09:31+00:00" + "time": "2024-06-12T16:24:41+00:00" }, { "name": "mockery/mockery", - "version": "1.6.11", + "version": "1.6.12", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "81a161d0b135df89951abd52296adf97deb0723d" + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/81a161d0b135df89951abd52296adf97deb0723d", - "reference": "81a161d0b135df89951abd52296adf97deb0723d", + "url": "https://api.github.com/repos/mockery/mockery/zipball/1f4efdd7d3beafe9807b08156dfcb176d18f1699", + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699", "shasum": "" }, "require": { @@ -6483,20 +6856,20 @@ "security": "https://github.com/mockery/mockery/security/advisories", "source": "https://github.com/mockery/mockery" }, - "time": "2024-03-21T18:34:15+00:00" + "time": "2024-05-16T03:13:13+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", "shasum": "" }, "require": { @@ -6504,11 +6877,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", @@ -6534,7 +6908,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" }, "funding": [ { @@ -6542,7 +6916,7 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2024-06-12T14:39:25+00:00" }, { "name": "nunomaduro/collision", @@ -7081,16 +7455,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.20", + "version": "10.5.24", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "547d314dc24ec1e177720d45c6263fb226cc2ae3" + "reference": "5f124e3e3e561006047b532fd0431bf5bb6b9015" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/547d314dc24ec1e177720d45c6263fb226cc2ae3", - "reference": "547d314dc24ec1e177720d45c6263fb226cc2ae3", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5f124e3e3e561006047b532fd0431bf5bb6b9015", + "reference": "5f124e3e3e561006047b532fd0431bf5bb6b9015", "shasum": "" }, "require": { @@ -7162,7 +7536,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.20" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.24" }, "funding": [ { @@ -7178,7 +7552,7 @@ "type": "tidelift" } ], - "time": "2024-04-24T06:32:35+00:00" + "time": "2024-06-20T13:09:54+00:00" }, { "name": "sebastian/cli-parser", @@ -8159,24 +8533,98 @@ ], "time": "2024-04-24T13:22:11+00:00" }, + { + "name": "spatie/error-solutions", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/spatie/error-solutions.git", + "reference": "d60d4d2ef4b7701c86134ded959667cac6215233" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/error-solutions/zipball/d60d4d2ef4b7701c86134ded959667cac6215233", + "reference": "d60d4d2ef4b7701c86134ded959667cac6215233", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "illuminate/broadcasting": "^10.0|^11.0", + "illuminate/cache": "^10.0|^11.0", + "illuminate/support": "^10.0|^11.0", + "livewire/livewire": "^2.11|^3.3.5", + "openai-php/client": "^0.10.1", + "orchestra/testbench": "^7.0|8.22.3|^9.0", + "pestphp/pest": "^2.20", + "phpstan/phpstan": "^1.11", + "psr/simple-cache": "^3.0", + "psr/simple-cache-implementation": "^3.0", + "spatie/ray": "^1.28", + "symfony/cache": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "vlucas/phpdotenv": "^5.5" + }, + "suggest": { + "openai-php/client": "Require get solutions from OpenAI", + "simple-cache-implementation": "To cache solutions from OpenAI" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\Ignition\\": "legacy/ignition", + "Spatie\\ErrorSolutions\\": "src", + "Spatie\\LaravelIgnition\\": "legacy/laravel-ignition" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ruben Van Assche", + "email": "ruben@spatie.be", + "role": "Developer" + } + ], + "description": "This is my package error-solutions", + "homepage": "https://github.com/spatie/error-solutions", + "keywords": [ + "error-solutions", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/error-solutions/issues", + "source": "https://github.com/spatie/error-solutions/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/Spatie", + "type": "github" + } + ], + "time": "2024-06-21T10:09:00+00:00" + }, { "name": "spatie/flare-client-php", - "version": "1.5.1", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/spatie/flare-client-php.git", - "reference": "e27977d534eefe04c154c6fd8460217024054c05" + "reference": "097040ff51e660e0f6fc863684ac4b02c93fa234" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/e27977d534eefe04c154c6fd8460217024054c05", - "reference": "e27977d534eefe04c154c6fd8460217024054c05", + "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/097040ff51e660e0f6fc863684ac4b02c93fa234", + "reference": "097040ff51e660e0f6fc863684ac4b02c93fa234", "shasum": "" }, "require": { "illuminate/pipeline": "^8.0|^9.0|^10.0|^11.0", "php": "^8.0", - "spatie/backtrace": "^1.5.2", + "spatie/backtrace": "^1.6.1", "symfony/http-foundation": "^5.2|^6.0|^7.0", "symfony/mime": "^5.2|^6.0|^7.0", "symfony/process": "^5.2|^6.0|^7.0", @@ -8218,7 +8666,7 @@ ], "support": { "issues": "https://github.com/spatie/flare-client-php/issues", - "source": "https://github.com/spatie/flare-client-php/tree/1.5.1" + "source": "https://github.com/spatie/flare-client-php/tree/1.7.0" }, "funding": [ { @@ -8226,28 +8674,28 @@ "type": "github" } ], - "time": "2024-05-03T15:43:14+00:00" + "time": "2024-06-12T14:39:14+00:00" }, { "name": "spatie/ignition", - "version": "1.14.1", + "version": "1.15.0", "source": { "type": "git", "url": "https://github.com/spatie/ignition.git", - "reference": "c23cc018c5f423d2f413b99f84655fceb6549811" + "reference": "e3a68e137371e1eb9edc7f78ffa733f3b98991d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/ignition/zipball/c23cc018c5f423d2f413b99f84655fceb6549811", - "reference": "c23cc018c5f423d2f413b99f84655fceb6549811", + "url": "https://api.github.com/repos/spatie/ignition/zipball/e3a68e137371e1eb9edc7f78ffa733f3b98991d2", + "reference": "e3a68e137371e1eb9edc7f78ffa733f3b98991d2", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", "php": "^8.0", - "spatie/backtrace": "^1.5.3", - "spatie/flare-client-php": "^1.4.0", + "spatie/error-solutions": "^1.0", + "spatie/flare-client-php": "^1.7", "symfony/console": "^5.4|^6.0|^7.0", "symfony/var-dumper": "^5.4|^6.0|^7.0" }, @@ -8309,20 +8757,20 @@ "type": "github" } ], - "time": "2024-05-03T15:56:16+00:00" + "time": "2024-06-12T14:55:22+00:00" }, { "name": "spatie/laravel-ignition", - "version": "2.7.0", + "version": "2.8.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ignition.git", - "reference": "f52124d50122611e8a40f628cef5c19ff6cc5b57" + "reference": "3c067b75bfb50574db8f7e2c3978c65eed71126c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/f52124d50122611e8a40f628cef5c19ff6cc5b57", - "reference": "f52124d50122611e8a40f628cef5c19ff6cc5b57", + "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/3c067b75bfb50574db8f7e2c3978c65eed71126c", + "reference": "3c067b75bfb50574db8f7e2c3978c65eed71126c", "shasum": "" }, "require": { @@ -8331,8 +8779,7 @@ "ext-mbstring": "*", "illuminate/support": "^10.0|^11.0", "php": "^8.1", - "spatie/flare-client-php": "^1.5", - "spatie/ignition": "^1.14", + "spatie/ignition": "^1.15", "symfony/console": "^6.2.3|^7.0", "symfony/var-dumper": "^6.2.3|^7.0" }, @@ -8401,20 +8848,20 @@ "type": "github" } ], - "time": "2024-05-02T13:42:49+00:00" + "time": "2024-06-12T15:01:18+00:00" }, { "name": "symfony/yaml", - "version": "v7.0.7", + "version": "v7.1.1", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "0d3916ae69ea28b59d94b60c4f2b50f4e25adb5c" + "reference": "fa34c77015aa6720469db7003567b9f772492bf2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/0d3916ae69ea28b59d94b60c4f2b50f4e25adb5c", - "reference": "0d3916ae69ea28b59d94b60c4f2b50f4e25adb5c", + "url": "https://api.github.com/repos/symfony/yaml/zipball/fa34c77015aa6720469db7003567b9f772492bf2", + "reference": "fa34c77015aa6720469db7003567b9f772492bf2", "shasum": "" }, "require": { @@ -8456,7 +8903,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v7.0.7" + "source": "https://github.com/symfony/yaml/tree/v7.1.1" }, "funding": [ { @@ -8472,7 +8919,7 @@ "type": "tidelift" } ], - "time": "2024-04-28T11:44:19+00:00" + "time": "2024-05-31T14:57:53+00:00" }, { "name": "theseer/tokenizer", diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php deleted file mode 100644 index 444fafb..0000000 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ /dev/null @@ -1,32 +0,0 @@ -id(); - $table->string('name'); - $table->string('email')->unique(); - $table->timestamp('email_verified_at')->nullable(); - $table->string('password'); - $table->rememberToken(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('users'); - } -}; diff --git a/database/migrations/2022_11_04_000100_create_roles_table.php b/database/migrations/2022_11_04_000100_create_roles_table.php new file mode 100644 index 0000000..3899351 --- /dev/null +++ b/database/migrations/2022_11_04_000100_create_roles_table.php @@ -0,0 +1,40 @@ +id(); + $table->string('name', 64)->default(''); + + $table->timestamps(); + }); + + Schema::table('users', function (Blueprint $table) { + $table->foreignId('role_id')->after('name')->constrained('roles'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function (Blueprint $table) { + $table->dropConstrainedForeignId('role_id'); + }); + Schema::dropIfExists('roles'); + } +} diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index a9f4519..6c6dcf4 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -3,6 +3,8 @@ namespace Database\Seeders; // use Illuminate\Database\Console\Seeds\WithoutModelEvents; +use App\Models\Role; +use App\Models\User; use Illuminate\Database\Seeder; class DatabaseSeeder extends Seeder @@ -12,11 +14,29 @@ class DatabaseSeeder extends Seeder */ public function run(): void { - // \App\Models\User::factory(10)->create(); - // \App\Models\User::factory()->create([ - // 'name' => 'Test User', - // 'email' => 'test@example.com', - // ]); + Role::create([ + 'name' => 'user', + 'created_at' => '2022-01-28T09:10:40.000000Z', + 'updated_at' => '2022-01-28T09:10:42.000000Z', + ]); + Role::create([ + 'name' => 'administrator', + 'created_at' => '2022-01-28T09:10:40.000000Z', + 'updated_at' => '2022-01-28T09:10:42.000000Z', + ]); + + User::create([ + 'name' => 'daan', + 'role_id' => 2, + 'email' => 'daan@test.nl', + 'solis_id' => '0219959', + ]); + User::create([ + 'name' => 'daan2', + 'role_id' => 2, + 'email' => 'daan2@test.nl', + 'solis_id' => 'assche001', + ]);; } } diff --git a/docker-compose.yml b/docker-compose.yml index 8ad394d..aefee1e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,8 +16,6 @@ services: container_name: openshift_frontend build: dockerfile: docker/frontend.dockerfile - environment: - - APP_ENV=local volumes: - ./:/var/www/public working_dir: /var/www/public @@ -34,8 +32,8 @@ services: dockerfile: docker/nginx.dockerfile environment: - VIRTUAL_HOST=openshift.docker.dev - - VIRTUAL_PROTO=http - - VIRTUAL_PORT=80 + - VIRTUAL_PROTO=https + - VIRTUAL_PORT=443 volumes: - ./:/var/www - ./storage/logs/:/var/log/nginx diff --git a/docker/docker.env b/docker/docker.env index 698d740..0d92f18 100644 --- a/docker/docker.env +++ b/docker/docker.env @@ -2,7 +2,7 @@ APP_NAME=Openshift APP_ENV=acceptance APP_KEY= APP_DEBUG=true -APP_URL=http://openshift.docker.dev +APP_URL=https://openshift.docker.dev LOG_CHANNEL=stack LOG_DEPRECATIONS_CHANNEL=null @@ -57,3 +57,8 @@ VITE_PUSHER_HOST="${PUSHER_HOST}" VITE_PUSHER_PORT="${PUSHER_PORT}" VITE_PUSHER_SCHEME="${PUSHER_SCHEME}" VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" + +OIDC_PROVIDER_URL=https://saml-idp.docker.dev/module.php/oidc/openid-configuration.php +OIDC_CLIENT_ID='_08e8f66151cb512f246bfc97b0272403ae48acdfc6' +OIDC_CLIENT_SECRET='_a7c1517c88c690f1a61f16d8808862769de959b979' +OIDC_SLO_LINK=https://saml-idp.docker.dev/nidp/app/logout \ No newline at end of file diff --git a/docker/vhost.conf b/docker/vhost.conf index 559435a..ee492b3 100644 --- a/docker/vhost.conf +++ b/docker/vhost.conf @@ -1,5 +1,13 @@ server { listen 80; + listen [::]:80; + listen 443 ssl; + listen [::]:443 ssl; + + ssl_certificate /var/www/docker/certificates/docker.dev.crt; + ssl_trusted_certificate /var/www/docker/certificates/docker.dev.crt; + ssl_certificate_key /var/www/docker/certificates/docker.dev.key; + server_name openshift.docker.dev; index index.php index.html; root /var/www/public; diff --git a/resources/lang/nl/auth.php b/resources/lang/nl/auth.php new file mode 100644 index 0000000..6598e2c --- /dev/null +++ b/resources/lang/nl/auth.php @@ -0,0 +1,20 @@ + 'These credentials do not match our records.', + 'password' => 'The provided password is incorrect.', + 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', + +]; diff --git a/resources/lang/nl/pagination.php b/resources/lang/nl/pagination.php new file mode 100644 index 0000000..d481411 --- /dev/null +++ b/resources/lang/nl/pagination.php @@ -0,0 +1,19 @@ + '« Previous', + 'next' => 'Next »', + +]; diff --git a/resources/lang/nl/passwords.php b/resources/lang/nl/passwords.php new file mode 100644 index 0000000..f1223bd --- /dev/null +++ b/resources/lang/nl/passwords.php @@ -0,0 +1,22 @@ + 'Your password has been reset.', + 'sent' => 'We have emailed your password reset link.', + 'throttled' => 'Please wait before retrying.', + 'token' => 'This password reset token is invalid.', + 'user' => "We can't find a user with that email address.", + +]; diff --git a/resources/lang/nl/validation.php b/resources/lang/nl/validation.php new file mode 100644 index 0000000..8dbe37f --- /dev/null +++ b/resources/lang/nl/validation.php @@ -0,0 +1,191 @@ + 'The :attribute field must be accepted.', + 'accepted_if' => 'The :attribute field must be accepted when :other is :value.', + 'active_url' => 'The :attribute field must be a valid URL.', + 'after' => 'The :attribute field must be a date after :date.', + 'after_or_equal' => 'The :attribute field must be a date after or equal to :date.', + 'alpha' => 'The :attribute field must only contain letters.', + 'alpha_dash' => 'The :attribute field must only contain letters, numbers, dashes, and underscores.', + 'alpha_num' => 'The :attribute field must only contain letters and numbers.', + 'array' => 'The :attribute field must be an array.', + 'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.', + 'before' => 'The :attribute field must be a date before :date.', + 'before_or_equal' => 'The :attribute field must be a date before or equal to :date.', + 'between' => [ + 'array' => 'The :attribute field must have between :min and :max items.', + 'file' => 'The :attribute field must be between :min and :max kilobytes.', + 'numeric' => 'The :attribute field must be between :min and :max.', + 'string' => 'The :attribute field must be between :min and :max characters.', + ], + 'boolean' => 'The :attribute field must be true or false.', + 'can' => 'The :attribute field contains an unauthorized value.', + 'confirmed' => 'The :attribute field confirmation does not match.', + 'current_password' => 'The password is incorrect.', + 'date' => 'The :attribute field must be a valid date.', + 'date_equals' => 'The :attribute field must be a date equal to :date.', + 'date_format' => 'The :attribute field must match the format :format.', + 'decimal' => 'The :attribute field must have :decimal decimal places.', + 'declined' => 'The :attribute field must be declined.', + 'declined_if' => 'The :attribute field must be declined when :other is :value.', + 'different' => 'The :attribute field and :other must be different.', + 'digits' => 'The :attribute field must be :digits digits.', + 'digits_between' => 'The :attribute field must be between :min and :max digits.', + 'dimensions' => 'The :attribute field has invalid image dimensions.', + 'distinct' => 'The :attribute field has a duplicate value.', + 'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.', + 'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.', + 'email' => 'The :attribute field must be a valid email address.', + 'ends_with' => 'The :attribute field must end with one of the following: :values.', + 'enum' => 'The selected :attribute is invalid.', + 'exists' => 'The selected :attribute is invalid.', + 'extensions' => 'The :attribute field must have one of the following extensions: :values.', + 'file' => 'The :attribute field must be a file.', + 'filled' => 'The :attribute field must have a value.', + 'gt' => [ + 'array' => 'The :attribute field must have more than :value items.', + 'file' => 'The :attribute field must be greater than :value kilobytes.', + 'numeric' => 'The :attribute field must be greater than :value.', + 'string' => 'The :attribute field must be greater than :value characters.', + ], + 'gte' => [ + 'array' => 'The :attribute field must have :value items or more.', + 'file' => 'The :attribute field must be greater than or equal to :value kilobytes.', + 'numeric' => 'The :attribute field must be greater than or equal to :value.', + 'string' => 'The :attribute field must be greater than or equal to :value characters.', + ], + 'hex_color' => 'The :attribute field must be a valid hexadecimal color.', + 'image' => 'The :attribute field must be an image.', + 'in' => 'The selected :attribute is invalid.', + 'in_array' => 'The :attribute field must exist in :other.', + 'integer' => 'The :attribute field must be an integer.', + 'ip' => 'The :attribute field must be a valid IP address.', + 'ipv4' => 'The :attribute field must be a valid IPv4 address.', + 'ipv6' => 'The :attribute field must be a valid IPv6 address.', + 'json' => 'The :attribute field must be a valid JSON string.', + 'lowercase' => 'The :attribute field must be lowercase.', + 'lt' => [ + 'array' => 'The :attribute field must have less than :value items.', + 'file' => 'The :attribute field must be less than :value kilobytes.', + 'numeric' => 'The :attribute field must be less than :value.', + 'string' => 'The :attribute field must be less than :value characters.', + ], + 'lte' => [ + 'array' => 'The :attribute field must not have more than :value items.', + 'file' => 'The :attribute field must be less than or equal to :value kilobytes.', + 'numeric' => 'The :attribute field must be less than or equal to :value.', + 'string' => 'The :attribute field must be less than or equal to :value characters.', + ], + 'mac_address' => 'The :attribute field must be a valid MAC address.', + 'max' => [ + 'array' => 'The :attribute field must not have more than :max items.', + 'file' => 'The :attribute field must not be greater than :max kilobytes.', + 'numeric' => 'The :attribute field must not be greater than :max.', + 'string' => 'The :attribute field must not be greater than :max characters.', + ], + 'max_digits' => 'The :attribute field must not have more than :max digits.', + 'mimes' => 'The :attribute field must be a file of type: :values.', + 'mimetypes' => 'The :attribute field must be a file of type: :values.', + 'min' => [ + 'array' => 'The :attribute field must have at least :min items.', + 'file' => 'The :attribute field must be at least :min kilobytes.', + 'numeric' => 'The :attribute field must be at least :min.', + 'string' => 'The :attribute field must be at least :min characters.', + ], + 'min_digits' => 'The :attribute field must have at least :min digits.', + 'missing' => 'The :attribute field must be missing.', + 'missing_if' => 'The :attribute field must be missing when :other is :value.', + 'missing_unless' => 'The :attribute field must be missing unless :other is :value.', + 'missing_with' => 'The :attribute field must be missing when :values is present.', + 'missing_with_all' => 'The :attribute field must be missing when :values are present.', + 'multiple_of' => 'The :attribute field must be a multiple of :value.', + 'not_in' => 'The selected :attribute is invalid.', + 'not_regex' => 'The :attribute field format is invalid.', + 'numeric' => 'The :attribute field must be a number.', + 'password' => [ + 'letters' => 'The :attribute field must contain at least one letter.', + 'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.', + 'numbers' => 'The :attribute field must contain at least one number.', + 'symbols' => 'The :attribute field must contain at least one symbol.', + 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.', + ], + 'present' => 'The :attribute field must be present.', + 'present_if' => 'The :attribute field must be present when :other is :value.', + 'present_unless' => 'The :attribute field must be present unless :other is :value.', + 'present_with' => 'The :attribute field must be present when :values is present.', + 'present_with_all' => 'The :attribute field must be present when :values are present.', + 'prohibited' => 'The :attribute field is prohibited.', + 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', + 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', + 'prohibits' => 'The :attribute field prohibits :other from being present.', + 'regex' => 'The :attribute field format is invalid.', + 'required' => 'The :attribute field is required.', + 'required_array_keys' => 'The :attribute field must contain entries for: :values.', + 'required_if' => 'The :attribute field is required when :other is :value.', + 'required_if_accepted' => 'The :attribute field is required when :other is accepted.', + 'required_unless' => 'The :attribute field is required unless :other is in :values.', + 'required_with' => 'The :attribute field is required when :values is present.', + 'required_with_all' => 'The :attribute field is required when :values are present.', + 'required_without' => 'The :attribute field is required when :values is not present.', + 'required_without_all' => 'The :attribute field is required when none of :values are present.', + 'same' => 'The :attribute field must match :other.', + 'size' => [ + 'array' => 'The :attribute field must contain :size items.', + 'file' => 'The :attribute field must be :size kilobytes.', + 'numeric' => 'The :attribute field must be :size.', + 'string' => 'The :attribute field must be :size characters.', + ], + 'starts_with' => 'The :attribute field must start with one of the following: :values.', + 'string' => 'The :attribute field must be a string.', + 'timezone' => 'The :attribute field must be a valid timezone.', + 'unique' => 'The :attribute has already been taken.', + 'uploaded' => 'The :attribute failed to upload.', + 'uppercase' => 'The :attribute field must be uppercase.', + 'url' => 'The :attribute field must be a valid URL.', + 'ulid' => 'The :attribute field must be a valid ULID.', + 'uuid' => 'The :attribute field must be a valid UUID.', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap our attribute placeholder + | with something more reader friendly such as "E-Mail Address" instead + | of "email". This simply helps us make our message more expressive. + | + */ + + 'attributes' => [], + +]; diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php new file mode 100644 index 0000000..9a22789 --- /dev/null +++ b/resources/views/layouts/app.blade.php @@ -0,0 +1,42 @@ + + + + + + + FSW-Dualnets + + + + + {{-- --}} + + + + + + + + + + + {{-- --}} + + + + + + @vite(['resources/sass/app.scss', 'resources/js/app.js', 'resources/js/hts-appteam-livewire/appteam-livewire.js']) + @livewireStyles + + + + @include('layouts.nav') +
+ @yield('content') +
+ @livewireScripts + + diff --git a/resources/views/layouts/nav.blade.php b/resources/views/layouts/nav.blade.php new file mode 100644 index 0000000..06728c7 --- /dev/null +++ b/resources/views/layouts/nav.blade.php @@ -0,0 +1,114 @@ +
+ +
+ + diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index 3353350..aac8e87 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -1,133 +1,23 @@ - - - - - - - Laravel - - - - - - - - - -
- @if (Route::has('login')) -
- @auth - Home - @else - Log in - - @if (Route::has('register')) - Register - @endif - @endauth -
- @endif - -
-
- - - -
- -
-
- -
-
- - - -
- -

Documentation

- -

- Laravel has wonderful documentation covering every aspect of the framework. Whether you are a newcomer or have prior experience with Laravel, we recommend reading our documentation from beginning to end. -

-
- - - - -
- - -
-
- - - -
- -

Laracasts

- -

- Laracasts offers thousands of video tutorials on Laravel, PHP, and JavaScript development. Check them out, see for yourself, and massively level up your development skills in the process. -

+@extends('layouts.app') + +@section('content') +
+
+
+ - -
-
-   -
- -
- Laravel v{{ Illuminate\Foundation\Application::VERSION }} (PHP v{{ PHP_VERSION }}) + {{ __('You are logged in!') }}
- - +
+@endsection diff --git a/vite.config.js b/vite.config.js index 421b569..35aa8b1 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,4 +1,5 @@ import { defineConfig } from 'vite'; +import fs from 'fs'; import laravel from 'laravel-vite-plugin'; export default defineConfig({ @@ -8,4 +9,16 @@ export default defineConfig({ refresh: true, }), ], + server: { + https: { + key: fs.readFileSync('docker/certificates/docker.dev.key'), + cert: fs.readFileSync('docker/certificates/docker.dev.crt'), + }, + host: true, + port: 7050, + hmr: { + host: 'openshift.docker.dev', + protocol: 'wss' + }, + }, }); From 35a7ab832d0e7e45ed4504a6be30236233496c4a Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 28 Jun 2024 16:37:35 +0200 Subject: [PATCH 59/78] Basepackage plus welcome met auth user. --- app/Models/User.php | 10 ++ config/hts-appteam.php | 242 ++++++++++++++++++++++++++ docker/backend.dockerfile | 19 +- docker/certificates/docker.dev.crt | 41 ++--- docker/certificates/docker.dev.key | 50 +++--- docker/nginx.dockerfile | 1 + resources/lang/en/auth.php | 20 +++ resources/lang/en/pagination.php | 19 ++ resources/lang/en/passwords.php | 22 +++ resources/lang/en/validation.php | 191 ++++++++++++++++++++ resources/views/layouts/app.blade.php | 2 - resources/views/welcome.blade.php | 8 +- 12 files changed, 573 insertions(+), 52 deletions(-) create mode 100644 config/hts-appteam.php create mode 100644 resources/lang/en/auth.php create mode 100644 resources/lang/en/pagination.php create mode 100644 resources/lang/en/passwords.php create mode 100644 resources/lang/en/validation.php diff --git a/app/Models/User.php b/app/Models/User.php index 4d7f70f..b514320 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -42,4 +42,14 @@ class User extends Authenticatable 'email_verified_at' => 'datetime', 'password' => 'hashed', ]; + + public function role() + { + return $this->belongsTo(Role::class); + } + + public function isAdmin() + { + return $this->role_id === Role::ADMINISTRATOR; + } } diff --git a/config/hts-appteam.php b/config/hts-appteam.php new file mode 100644 index 0000000..e31bcf4 --- /dev/null +++ b/config/hts-appteam.php @@ -0,0 +1,242 @@ + true, + + /* + * saml, oidc or local + */ + 'login_type' => [ + 'oidc' + ], + + /* + * The field used in the database to identify a user + */ + 'user_identifier_key' => env('AUTH_USER_IDENTIFIER_KEY', 'solis_id'), + + /** + * Urls which are ignored in the auth middleware. These urls should be application specific urls. + * urls defined in exclude_urls_for_auth checked on exact match. + * urls defined in exclude_urls_for_auth_wildcard are only compared to the first part of the string. + * This variable you probably only use for url with a token. + */ + 'exclude_urls_for_auth' => [ + // Example: + // '/students', + ], + 'exclude_urls_for_auth_wildcard' => [ + // Example: + //'/students' + ], + + /* + * All SAML Settings + */ + 'saml_settings' => [ + /* + * SAML SP Configuration + */ + 'saml_sp' => env('SAML_SP', 'default-sp'), + + /* + * Are users which are not locally known allowed to use this application? + */ + 'allow_registration' => false, + + /* + * Allow registration only based on these filters + */ + 'allow_registration_filter' => [ + [ + 'attribute' => 'affiliation', + 'exp' => 'IS', // IN, IS, NOT_IN, NOT, + 'value' => 'employee' + ] + ], + + /* + * Are users allowed to use this application anonymous? + * This check is only done when user is not allowed to automatically register. + * This is used for application where it is not required to store user data, + * but we also want to limit access to users with a solis id. + */ + 'allow_anonymous' => false, + + /* + * key/value pairs with attributes which are requested (i.e. not needed) + * Keys are the saml attribute values we get back from the saml idp. + * Values are the columns/fields in the application in the user model. + * The migration is made dynamically, the defined values are created during the migration. + */ + 'requested_attributes' => [ + 'uuShortID' => 'solis_id', + 'displayName' => 'name', + 'uuLegacyDepartment' => 'faculty', + 'department' => 'department', + 'mail' => 'email', + 'urn:mace:dir:attribute-def:eduPersonAffiliation' => 'affiliation' + ], + + /* + * list of attributes which are required (i.e. are needed) + * During the migration, fields defined in this array are not nullable. + */ + 'required_attributes' => [ + 'solis_id', + 'email', + 'affiliation' + ], + + /* + * list of attributes which must be unique + */ + 'unique_attributes' => [ + 'solis_id', + 'email' + ], + + /* + * list of attributes which are not stored, but are used in the login. + * For example in the 'allow_registration_filter' + */ + 'not_stored_attributes' => [ + 'affiliation' + ], + ], + + /* + * OIDC settings + */ + 'oidc_settings' => [ + /* + * Basic OIDC client settings + */ + 'provider_url' => env('OIDC_PROVIDER_URL'), + 'client_id' => env('OIDC_CLIENT_ID'), + 'client_secret' => env('OIDC_CLIENT_SECRET'), + + /* + * Default scopes + */ + 'scopes' => [ + 'urn:uu.nl:idp:scope:oauth:fsw:appteam' + ], + + /* + * Enable 2FA + */ + '2fa_enabled' => env('OIDC_2FA_ENABLED', false), + + /* + * Are users allowed to use this application anonymous? + * This check is only done when user is not allowed to automatically register. + * This is used for application where it is not required to store user data, + * but we also want to limit access to users with a solis id. + */ + 'allow_anonymous' => false, + + /* + * Are users which are not locally known allowed to use this application? + */ + 'allow_registration' => false, + + /* + * Allow registration only based on these filters + */ + 'allow_registration_filter' => [ + [ + 'attribute' => 'locale', + 'exp' => 'IS', // IN, IS, NOT_IN, NOT, + 'value' => 'NL' + ] + ], + + /* + * key/value pairs with attributes which are requested (i.e. not needed) + * Keys are the OIDC attribute values we get back from the OIDC idp. + * Values are the columns/fields in the application in the user model. + * The migration is made dynamically, the defined values are created during the migration. + */ + 'requested_attributes' => [ + 'uuShortID' => 'solis_id', + 'displayName' => 'name', + 'mail' => 'email' + ], + + /* + * list of attributes which are required (i.e. are needed) + * During the migration, fields defined in this array are not nullable. + */ + 'required_attributes' => [ + 'solis_id', + 'email', + 'affiliation' + ], + + /* + * list of attributes which must be unique + */ + 'unique_attributes' => [ + 'solis_id', + 'email' + ], + + /* + * list of attributes that you want saved as JSON string. + * Values are the columns/fields in the application user model + * Only used in OIDC, not in SAML + */ + 'json_attributes' => [ + // 'email' + ], + + /* + * list of attributes which are not stored, but are used in the login. + * For example in the 'allow_registration_filter' + */ + 'not_stored_attributes' => [ + 'locale' + ], + ], + + /* + * Local Login Settings + */ + 'local_settings' => [ + /* + * For login_type = local we need a user fields mapping. + * Key's are the names used in the application + * The values are the fields used in the base package. + */ + 'user_model_mapping' => [ + 'solis_id' => 'solis_id', + 'name' => 'name', + 'email' => 'email', + 'password' => 'password' + ], + + /* + * For login_type = local we can define which routes we want to use. + */ + 'login_route' => [ + 'login' => true, + 'logout' => true, + 'register' => false, + 'reset' => true, // for resetting passwords + // TODO: Confirm and verify is not finished jet. + 'confirm' => false, // for additional password confirmations + 'verify' => false, // for email verification + ], + + /* + * set local login to be only available for non UU users, this is useful + * if you have multiple login types and you want to force UU users + * to use SAML or OIDC login + */ + 'exclude_uu_users_from_local_login' => true + ], +]; diff --git a/docker/backend.dockerfile b/docker/backend.dockerfile index d1eb1f1..e504805 100644 --- a/docker/backend.dockerfile +++ b/docker/backend.dockerfile @@ -12,6 +12,14 @@ RUN apt-get install -y zip RUN apt-get install -y sudo nano RUN apt-get install -y mariadb-client +RUN apt-get install -y libonig-dev +RUN apt-get install -y ca-certificates curl gnupg + +# required for sending mail. +RUN apt-get install -y sendmail +RUN apt-get install -y libzip-dev +RUN apt-get install -y zlib1g-dev + # install mysql RUN docker-php-ext-install pdo_mysql mysqli @@ -24,6 +32,11 @@ RUN apt-get install -y libmcrypt-dev \ RUN apt-get clean -y +# email configuration +RUN echo "sendmail_path='/usr/sbin/sendmail -t -i --smtp-addr=\"mail.docker:1025\"'" >> /usr/local/etc/php/conf.d/sendmail.ini +RUN sed -i '/#!\/bin\/sh/aservice sendmail restart' /usr/local/bin/docker-php-entrypoint +RUN sed -i '/#!\/bin\/sh/aecho "$(hostname -i)\t$(hostname) $(hostname).localhost" >> /etc/hosts' /usr/local/bin/docker-php-entrypoint + # set corrent TimeZone ENV TZ=Europe/Amsterdam RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone @@ -31,13 +44,12 @@ 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 curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer # run composer RUN composer install -## TODO eigenlijk wil je een image zonder dev packages. -##RUN composer install --no-dev --no-scripts # install self signed certifcates to thrust other local dev environments COPY ./docker/certificates/docker.dev.crt /usr/local/share/ca-certificates @@ -55,5 +67,6 @@ RUN chmod ugo+x /entrypoint.sh RUN php artisan optimize ENTRYPOINT /entrypoint.sh +EXPOSE 9000 CMD ["php-fpm"] diff --git a/docker/certificates/docker.dev.crt b/docker/certificates/docker.dev.crt index 43723df..c375c0a 100644 --- a/docker/certificates/docker.dev.crt +++ b/docker/certificates/docker.dev.crt @@ -1,22 +1,23 @@ -----BEGIN CERTIFICATE----- -MIIDlTCCAn2gAwIBAgIUEboTAYALleqfvNlhrRNTEug/aOYwDQYJKoZIhvcNAQEL -BQAwSjELMAkGA1UEBhMCVVMxGDAWBgNVBAoMD19EZXZlbG9wbWVudCBDQTEhMB8G -A1UEAwwYRGV2ZWxvcG1lbnQgY2VydGlmaWNhdGVzMB4XDTIzMDQwNjA4MzEyNFoX -DTI0MDQwNTA4MzEyNFowPjELMAkGA1UEBhMCVVMxGjAYBgNVBAoMEUxvY2FsIERl -dmVsb3BtZW50MRMwEQYDVQQDDApkb2NrZXIuZGV2MIIBIjANBgkqhkiG9w0BAQEF -AAOCAQ8AMIIBCgKCAQEAxPfqzSyPlWjx7aeSEsq/zyeNx562Ybc/HWeJYJvOGs+9 -YIOeFSEAFdWJdzjICLXSRnJr1Lnwc1pq6ADGMwpx8AFK0MrDhnANXMAswN27R33x -TDJqUGayPgoXxpkFj1U8yv6kn2wtwD79aEnUnWgFg9Nu/iaonibyX9mJLfqZ1PLO -88xC03OJgCkIacCx2OyuJm4wjWUeaGhkFydpetg/tLYn7x2wbgdGEw39wUTLp1rO -kVZ5fQaFfH9AywDTKFE0rjclYrzq5qlqnxQNOe/OrWuIcp3PEP4QEgSDPRVA2unE -gIIiX5QEV02mm2t4WpIGNBMPkStmtZ5ihFEXfE8cpQIDAQABo38wfTAfBgNVHSME -GDAWgBR6o+FjjiiVeYYWJnAteGJHUHxaszAJBgNVHRMEAjAAMAsGA1UdDwQEAwIE -8DAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwIwYDVR0RBBwwGoIKZG9j -a2VyLmRldoIMKi5kb2NrZXIuZGV2MA0GCSqGSIb3DQEBCwUAA4IBAQAelQz49kvG -MJvfLTDHFDLmUFOJPdMDK060dnSclEpgCDljy88H2tDmlEehbiF+XI/GPdxfY346 -6PADb2owhU7bWWiQUiGjKG/IeCWEvDbFvqaEAWnTSxe6cqoYpsc10BeFPeJxaEIX -g2QXb73RLn1eFCb+NRnjIZXj59mZ/tz663nYCB5QZxDdxUT2GF6f6Xvsc4DiGTJz -LKJh8CJvt1g+Q+KPP85fDM49ylhTAqo7nUhvnVA3cwVBV0g+UO6bUp6LGDeJ8FtI -/3XtjPEMW4v4tOBJqN2vGX9PrHvysCHAFUBndIbgQZE0oMVaZ4gwFkfW567tKBb1 -tJTACsSZPZo+ +MIID0TCCArmgAwIBAgIJAJ+/2QWUmWq4MA0GCSqGSIb3DQEBCwUAMEoxCzAJBgNV +BAYTAlVTMRgwFgYDVQQKDA9fRGV2ZWxvcG1lbnQgQ0ExITAfBgNVBAMMGERldmVs +b3BtZW50IGNlcnRpZmljYXRlczAeFw0yNDA0MDUwODU3MzNaFw0yOTA0MDQwODU3 +MzNaMD4xCzAJBgNVBAYTAlVTMRowGAYDVQQKDBFMb2NhbCBEZXZlbG9wbWVudDET +MBEGA1UEAwwKZG9ja2VyLmRldjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBALpeqz1b33UyqlmJTHbMimI+1i+5eUyC4DWmsxw2+8F8AU3necKBVS90N1ln +zdTT57E/u51Fd8EqEKC4OF5jQqDSRzkZ+71Wo1oSRtwlx+J8zeg6CYKTwEh2jRDs +gclZqACSJHE6bpl6VbmpnGefmHwTTWnRVpjJNvcoPPkkOfenGE1WGMcMFCfnfvAk +ajAbB5ccEPT9QxkuwFUP85tqtDT9hfMhrzu1Pq9Wvjhu01xpQLLhpF3ll5fvuCv0 +b7rMd3Q+K5vBFXbAM6Hy/1igbirgISZPS8I2i4+9jRXHcyAX9MiRC/hZB0yhRyYQ +Bw8r41E8bsIsoNAb1lbTheNN/TMCAwEAAaOBxTCBwjBkBgNVHSMEXTBboU6kTDBK +MQswCQYDVQQGEwJVUzEYMBYGA1UECgwPX0RldmVsb3BtZW50IENBMSEwHwYDVQQD +DBhEZXZlbG9wbWVudCBjZXJ0aWZpY2F0ZXOCCQDJ4K5W2fvgFjAJBgNVHRMEAjAA +MAsGA1UdDwQEAwIE8DAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwIwYD +VR0RBBwwGoIKZG9ja2VyLmRldoIMKi5kb2NrZXIuZGV2MA0GCSqGSIb3DQEBCwUA +A4IBAQAwQXs2GOcrgROlXu7S/bPUHy9kIfT195UC8mmodzvS37/+cqqL4TJb8dx6 +wZePtD0KA+Y7Iy51Ql1+/99Q4Bz729mSpsY+H/wVc4wYknS6PutIl/b78z8seFzq +NTqmKkyfH6iUdJ5duVaCVQo0kedS+p9tzF7LLkfjpg7ZzQQaPJDAsdfZjrFhLwuZ +R3aU4WTP5/0kGcZb++hSi3R1lb2+aILuMesDd4hK9Fi0Yt7s8dXw6o5V835fq9gg +uc/sXB22Ul4ieVSvJBerSLS0wzblPcWI3k54s9gkaFNYLz5uS5uIfke6lWkYjbAh +CUSgteN3gmousqkDQ0oNvqtOQP1M -----END CERTIFICATE----- diff --git a/docker/certificates/docker.dev.key b/docker/certificates/docker.dev.key index 5a49900..4f0b85f 100644 --- a/docker/certificates/docker.dev.key +++ b/docker/certificates/docker.dev.key @@ -1,27 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAxPfqzSyPlWjx7aeSEsq/zyeNx562Ybc/HWeJYJvOGs+9YIOe -FSEAFdWJdzjICLXSRnJr1Lnwc1pq6ADGMwpx8AFK0MrDhnANXMAswN27R33xTDJq -UGayPgoXxpkFj1U8yv6kn2wtwD79aEnUnWgFg9Nu/iaonibyX9mJLfqZ1PLO88xC -03OJgCkIacCx2OyuJm4wjWUeaGhkFydpetg/tLYn7x2wbgdGEw39wUTLp1rOkVZ5 -fQaFfH9AywDTKFE0rjclYrzq5qlqnxQNOe/OrWuIcp3PEP4QEgSDPRVA2unEgIIi -X5QEV02mm2t4WpIGNBMPkStmtZ5ihFEXfE8cpQIDAQABAoIBAQCXSRhmqMBL8QRJ -Fnkix+mVUfsbBPNukFIA4sJomqMugrshQ1aLQgKPwqjIEqvJzOWKSF48UOi3oQ4V -zmptT6t9vXBaeDK/spcA03ZMWMJ8weYxMVPpF0f2UMg8ONJFaiG8hOOqs2tcisUW -cgbFM91wiFhrCwReHOny5uHvl9jJ7q8eVHhBrcysQLDQh/RHp7oFhMNVKmTn2UXI -wwVW35CKEEt+e2oEQtcs5+cxCynaCQquedglrXlrhPa/bHHMohQrSDxrKkE0nxfg -EB5R5Qrd+mkx23ivYYabjGMZQa66GBcLPTC7M3bys95fIKNRYW+79J/x5/9za+7m -CMXtgTChAoGBAPOpldSuBWP5OTqhtgPCNFRnEXZ6fcyr2/JUg3SHtCNt+9jsMWzk -TgrHvWaflZE2D54u4e9ITKV91mO9FrLDhKIWabPGv8pgx2UCkQljYBw1CdqZciPC -1ZEDhVRUaF6PL3qM3HUllah6fZNYAWs1dQ58mDn1vMTzgmgouwakAN45AoGBAM7x -EnnvJR0j9i5VLUD0yxFTWP/xHY2VhRZS7bBqRP4dYGkbfhRAqa1g3267GomdtoOy -PhGQnJssv+Ppu9caXsSO8O2rHDwJkORW/CJ1je20G1uhlItOg1uecr2CXz7Tmpa/ -43p/4ruA+H25CB5QdHY6JooABy0hXOffDxIRtnHNAoGAelEAYQJ2vEgI3ZD+MQbV -hCU1U/eLnSoMwKqCTwYsfLiie7Od4B7/ulOolZK432t3DZ5VVuxBZbY04F60vUp/ -E2sS5ud3sd1BW0idjEvxnFdXuf/bl24gDarpzHqO5iEU4X1C0h/q7+eFkGjWVX5B -Y+NR+46Lk4b2SNlhgaTktqkCgYEAm8Wzlr2BPnI3eaD8M40Q3rXSpLYm/NC0IZ3C -9azIyk/qprPfL/eMwcnN5lhJHZXuMSwWtLoaaGRC/ZiPoNdkxqiiiwTmd/rrajZg -DMBYWbndbhgu7L3o+ypGTIi6kVxPXXKMFUX2shXe9yQ1DDybrfMP14k13a7jdFbf -zUYwA3ECgYBqOP9X1f1FkQIGhXrMVgo8mc6+LUP6/n7n6LTJ4SWiuojRyhhEZhLC -NWKGR1PVM4Z0Lhn2n1Iva959hkBU6poBpidgHXylflL/JoUWV93NItc22SoT/Jp9 -HHfbAZ1caVoisatIHW/rB8iQVPne8WJ4t/5p2tzhMq4m3jkgomZ4lQ== +MIIEowIBAAKCAQEAul6rPVvfdTKqWYlMdsyKYj7WL7l5TILgNaazHDb7wXwBTed5 +woFVL3Q3WWfN1NPnsT+7nUV3wSoQoLg4XmNCoNJHORn7vVajWhJG3CXH4nzN6DoJ +gpPASHaNEOyByVmoAJIkcTpumXpVuamcZ5+YfBNNadFWmMk29yg8+SQ596cYTVYY +xwwUJ+d+8CRqMBsHlxwQ9P1DGS7AVQ/zm2q0NP2F8yGvO7U+r1a+OG7TXGlAsuGk +XeWXl++4K/Rvusx3dD4rm8EVdsAzofL/WKBuKuAhJk9LwjaLj72NFcdzIBf0yJEL ++FkHTKFHJhAHDyvjUTxuwiyg0BvWVtOF4039MwIDAQABAoIBAQCWnNkgXjXpPcfD +Uhz0SPpwyT1JFkf72CyfzxcibyDnzXI0ZiPVV7XjArWUUDpci9/LM6lIQRK1jWwg +pqAPT4JR+33JnMD/05txuCGB2hp+Y8P3r6dt2j/jj8MS8T813HnT9Eb1JnapG99Z +isO2TpjpdKP0J1QnZz0/YkpcQbWC+CqXpQ1FFaA+k0c5RGltnSVfP6OKcq/k4yvo +phD0MnZBDBvgKiHXugOD7Rdm0slS6B2IZsYeWIsLZ6g+usPdPdvjmLODV9cPPm9D +bNhTnbstvyULdih+fhteZv8d6SNdQqTZy+JeJZjiHYQow51LAm0bxsnmzlnRD3E2 +OyAvRWlpAoGBAOARmOBk+Milu86e6b5sLMGiyshn5ocZhTJmNzcq/R3AJnV9TLE1 +5lGvLwi/HpVvlmavD8ScZsM8jXOJj506DAyj2Ei7b0b+WapmiROzKO6rD0uBQdoo +EXKn7jO2Rh+Z3AIHxLmcSbjLwjxIQ0o7FOSoMlQMYaK3+nf+g/F9y2tnAoGBANTt +wFabUdvnxkMhGmiMuU6g8rryV1fLz/e9lUQsjGAWBe5PUXEmMGS2uH8mXlwqVB+G +Hd/dzqdns4MnlSZzxR/fToK2WRf1m1SjhfnHB+CoCz/JbwsUQJddEgfK6lbEB/8f ++iNlhO0qn8KWumdUU1sRQGf4xTkdasFVRNeiYYxVAoGAaPnVlcu4gsii5HqvJ/em +QFH0j0+eQU1Digk5dS8+xuFvIzxA4gVOkpZwgriHq5tL62+5A3QC8RU9cBPSpOa9 +Hm7kta6aw7gGaj7/masmUiryT32PTJXZFs52WuPalpOO76SUFiGSqHFN3tA8NlrX +vwjOC3KBi6qGPhGP32QAGaECgYBgGt9RN9F+u+IUsoBE6B9LigGEt5UMn4VCgGM6 +3hCN3eLXaR2NQHtfOcmUOjEk0EYf5FzfijGYBYpUjC0Zqe8zL4s0HDGiSszNKvFx +h4/aqn5JUBW6nm145B0bP0790oT5delkyJFyqmZpYbbIpJrq46J6SyJZYRmqIV5t +JXF58QKBgDNbodrxQtZGZm+rnV5t47YZuhuAOT3hiPvZv9yVG9fb+ZuqIwxhzNMy +tjsfYHy05xzJOMD3OQplRawRzTmb5n/aooxpI2T9WbA/NuLK+RJSxdAqA3/TljZ0 +FGJOX7CotLoStVMfTDTJJpmhFpEuqV7jlPQQKQ1g3l7Il990b4n1 -----END RSA PRIVATE KEY----- diff --git a/docker/nginx.dockerfile b/docker/nginx.dockerfile index b87dec5..09ef1fa 100644 --- a/docker/nginx.dockerfile +++ b/docker/nginx.dockerfile @@ -1,3 +1,4 @@ FROM nginxinc/nginx-unprivileged:stable-alpine ADD ./docker/vhost.conf /etc/nginx/conf.d/default.conf +EXPOSE 443 diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php new file mode 100644 index 0000000..6598e2c --- /dev/null +++ b/resources/lang/en/auth.php @@ -0,0 +1,20 @@ + 'These credentials do not match our records.', + 'password' => 'The provided password is incorrect.', + 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', + +]; diff --git a/resources/lang/en/pagination.php b/resources/lang/en/pagination.php new file mode 100644 index 0000000..d481411 --- /dev/null +++ b/resources/lang/en/pagination.php @@ -0,0 +1,19 @@ + '« Previous', + 'next' => 'Next »', + +]; diff --git a/resources/lang/en/passwords.php b/resources/lang/en/passwords.php new file mode 100644 index 0000000..f1223bd --- /dev/null +++ b/resources/lang/en/passwords.php @@ -0,0 +1,22 @@ + 'Your password has been reset.', + 'sent' => 'We have emailed your password reset link.', + 'throttled' => 'Please wait before retrying.', + 'token' => 'This password reset token is invalid.', + 'user' => "We can't find a user with that email address.", + +]; diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php new file mode 100644 index 0000000..8dbe37f --- /dev/null +++ b/resources/lang/en/validation.php @@ -0,0 +1,191 @@ + 'The :attribute field must be accepted.', + 'accepted_if' => 'The :attribute field must be accepted when :other is :value.', + 'active_url' => 'The :attribute field must be a valid URL.', + 'after' => 'The :attribute field must be a date after :date.', + 'after_or_equal' => 'The :attribute field must be a date after or equal to :date.', + 'alpha' => 'The :attribute field must only contain letters.', + 'alpha_dash' => 'The :attribute field must only contain letters, numbers, dashes, and underscores.', + 'alpha_num' => 'The :attribute field must only contain letters and numbers.', + 'array' => 'The :attribute field must be an array.', + 'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.', + 'before' => 'The :attribute field must be a date before :date.', + 'before_or_equal' => 'The :attribute field must be a date before or equal to :date.', + 'between' => [ + 'array' => 'The :attribute field must have between :min and :max items.', + 'file' => 'The :attribute field must be between :min and :max kilobytes.', + 'numeric' => 'The :attribute field must be between :min and :max.', + 'string' => 'The :attribute field must be between :min and :max characters.', + ], + 'boolean' => 'The :attribute field must be true or false.', + 'can' => 'The :attribute field contains an unauthorized value.', + 'confirmed' => 'The :attribute field confirmation does not match.', + 'current_password' => 'The password is incorrect.', + 'date' => 'The :attribute field must be a valid date.', + 'date_equals' => 'The :attribute field must be a date equal to :date.', + 'date_format' => 'The :attribute field must match the format :format.', + 'decimal' => 'The :attribute field must have :decimal decimal places.', + 'declined' => 'The :attribute field must be declined.', + 'declined_if' => 'The :attribute field must be declined when :other is :value.', + 'different' => 'The :attribute field and :other must be different.', + 'digits' => 'The :attribute field must be :digits digits.', + 'digits_between' => 'The :attribute field must be between :min and :max digits.', + 'dimensions' => 'The :attribute field has invalid image dimensions.', + 'distinct' => 'The :attribute field has a duplicate value.', + 'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.', + 'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.', + 'email' => 'The :attribute field must be a valid email address.', + 'ends_with' => 'The :attribute field must end with one of the following: :values.', + 'enum' => 'The selected :attribute is invalid.', + 'exists' => 'The selected :attribute is invalid.', + 'extensions' => 'The :attribute field must have one of the following extensions: :values.', + 'file' => 'The :attribute field must be a file.', + 'filled' => 'The :attribute field must have a value.', + 'gt' => [ + 'array' => 'The :attribute field must have more than :value items.', + 'file' => 'The :attribute field must be greater than :value kilobytes.', + 'numeric' => 'The :attribute field must be greater than :value.', + 'string' => 'The :attribute field must be greater than :value characters.', + ], + 'gte' => [ + 'array' => 'The :attribute field must have :value items or more.', + 'file' => 'The :attribute field must be greater than or equal to :value kilobytes.', + 'numeric' => 'The :attribute field must be greater than or equal to :value.', + 'string' => 'The :attribute field must be greater than or equal to :value characters.', + ], + 'hex_color' => 'The :attribute field must be a valid hexadecimal color.', + 'image' => 'The :attribute field must be an image.', + 'in' => 'The selected :attribute is invalid.', + 'in_array' => 'The :attribute field must exist in :other.', + 'integer' => 'The :attribute field must be an integer.', + 'ip' => 'The :attribute field must be a valid IP address.', + 'ipv4' => 'The :attribute field must be a valid IPv4 address.', + 'ipv6' => 'The :attribute field must be a valid IPv6 address.', + 'json' => 'The :attribute field must be a valid JSON string.', + 'lowercase' => 'The :attribute field must be lowercase.', + 'lt' => [ + 'array' => 'The :attribute field must have less than :value items.', + 'file' => 'The :attribute field must be less than :value kilobytes.', + 'numeric' => 'The :attribute field must be less than :value.', + 'string' => 'The :attribute field must be less than :value characters.', + ], + 'lte' => [ + 'array' => 'The :attribute field must not have more than :value items.', + 'file' => 'The :attribute field must be less than or equal to :value kilobytes.', + 'numeric' => 'The :attribute field must be less than or equal to :value.', + 'string' => 'The :attribute field must be less than or equal to :value characters.', + ], + 'mac_address' => 'The :attribute field must be a valid MAC address.', + 'max' => [ + 'array' => 'The :attribute field must not have more than :max items.', + 'file' => 'The :attribute field must not be greater than :max kilobytes.', + 'numeric' => 'The :attribute field must not be greater than :max.', + 'string' => 'The :attribute field must not be greater than :max characters.', + ], + 'max_digits' => 'The :attribute field must not have more than :max digits.', + 'mimes' => 'The :attribute field must be a file of type: :values.', + 'mimetypes' => 'The :attribute field must be a file of type: :values.', + 'min' => [ + 'array' => 'The :attribute field must have at least :min items.', + 'file' => 'The :attribute field must be at least :min kilobytes.', + 'numeric' => 'The :attribute field must be at least :min.', + 'string' => 'The :attribute field must be at least :min characters.', + ], + 'min_digits' => 'The :attribute field must have at least :min digits.', + 'missing' => 'The :attribute field must be missing.', + 'missing_if' => 'The :attribute field must be missing when :other is :value.', + 'missing_unless' => 'The :attribute field must be missing unless :other is :value.', + 'missing_with' => 'The :attribute field must be missing when :values is present.', + 'missing_with_all' => 'The :attribute field must be missing when :values are present.', + 'multiple_of' => 'The :attribute field must be a multiple of :value.', + 'not_in' => 'The selected :attribute is invalid.', + 'not_regex' => 'The :attribute field format is invalid.', + 'numeric' => 'The :attribute field must be a number.', + 'password' => [ + 'letters' => 'The :attribute field must contain at least one letter.', + 'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.', + 'numbers' => 'The :attribute field must contain at least one number.', + 'symbols' => 'The :attribute field must contain at least one symbol.', + 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.', + ], + 'present' => 'The :attribute field must be present.', + 'present_if' => 'The :attribute field must be present when :other is :value.', + 'present_unless' => 'The :attribute field must be present unless :other is :value.', + 'present_with' => 'The :attribute field must be present when :values is present.', + 'present_with_all' => 'The :attribute field must be present when :values are present.', + 'prohibited' => 'The :attribute field is prohibited.', + 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', + 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', + 'prohibits' => 'The :attribute field prohibits :other from being present.', + 'regex' => 'The :attribute field format is invalid.', + 'required' => 'The :attribute field is required.', + 'required_array_keys' => 'The :attribute field must contain entries for: :values.', + 'required_if' => 'The :attribute field is required when :other is :value.', + 'required_if_accepted' => 'The :attribute field is required when :other is accepted.', + 'required_unless' => 'The :attribute field is required unless :other is in :values.', + 'required_with' => 'The :attribute field is required when :values is present.', + 'required_with_all' => 'The :attribute field is required when :values are present.', + 'required_without' => 'The :attribute field is required when :values is not present.', + 'required_without_all' => 'The :attribute field is required when none of :values are present.', + 'same' => 'The :attribute field must match :other.', + 'size' => [ + 'array' => 'The :attribute field must contain :size items.', + 'file' => 'The :attribute field must be :size kilobytes.', + 'numeric' => 'The :attribute field must be :size.', + 'string' => 'The :attribute field must be :size characters.', + ], + 'starts_with' => 'The :attribute field must start with one of the following: :values.', + 'string' => 'The :attribute field must be a string.', + 'timezone' => 'The :attribute field must be a valid timezone.', + 'unique' => 'The :attribute has already been taken.', + 'uploaded' => 'The :attribute failed to upload.', + 'uppercase' => 'The :attribute field must be uppercase.', + 'url' => 'The :attribute field must be a valid URL.', + 'ulid' => 'The :attribute field must be a valid ULID.', + 'uuid' => 'The :attribute field must be a valid UUID.', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap our attribute placeholder + | with something more reader friendly such as "E-Mail Address" instead + | of "email". This simply helps us make our message more expressive. + | + */ + + 'attributes' => [], + +]; diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 9a22789..08e3138 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -29,7 +29,6 @@ @vite(['resources/sass/app.scss', 'resources/js/app.js', 'resources/js/hts-appteam-livewire/appteam-livewire.js']) - @livewireStyles @@ -37,6 +36,5 @@
@yield('content')
- @livewireScripts diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index aac8e87..3152b98 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -13,8 +13,12 @@ {{ session('status') }}
@endif - - {{ __('You are logged in!') }} + @auth() + {{ __( Auth::user()->name . ' You are logged in!') }} + {{ 'Je hebt de rol: ' . Auth::user()->role->name}} + @else + {{ __('You are not logged in!') }} + @endauth
From b14d233c704272328a0d4df0f4990e0a97068f3c Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 28 Jun 2024 17:06:21 +0200 Subject: [PATCH 60/78] Added gittoken. --- .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 4b02441..6aaa57b 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -18,6 +18,8 @@ jobs: - name: Build from Dockerfile id: build-image uses: redhat-actions/buildah-build@v2 + env: + GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} with: image: fsw-openshift tags: latest From 621c324b17d27c10feb13dbb662546466f4a685c Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 28 Jun 2024 17:28:05 +0200 Subject: [PATCH 61/78] Added gittoken. --- .github/workflows/docker-image-Laravel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 6aaa57b..a976d6d 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -7,7 +7,7 @@ env: IMAGE_REGISTRY_PASSWORD: ${{ github.token }} on: push: - branches: [ "master", "develop", "feature/da_opschonen"] + branches: [ "master", "develop", "feature/da_add_la_basepackage"] pull_request: branches: [ "master" ] jobs: @@ -19,7 +19,7 @@ jobs: id: build-image uses: redhat-actions/buildah-build@v2 env: - GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} + COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.COMPOSER_AUTH_JSON }}"} }' with: image: fsw-openshift tags: latest From 0ea55f808efa861d0b8b9dcb6ad9e0946eb218f5 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 28 Jun 2024 17:41:25 +0200 Subject: [PATCH 62/78] Added gittoken. --- .github/workflows/docker-image-Laravel.yml | 2 +- lang/en/auth.php | 20 +++ lang/en/pagination.php | 19 ++ lang/en/passwords.php | 22 +++ lang/en/validation.php | 191 +++++++++++++++++++++ 5 files changed, 253 insertions(+), 1 deletion(-) create mode 100644 lang/en/auth.php create mode 100644 lang/en/pagination.php create mode 100644 lang/en/passwords.php create mode 100644 lang/en/validation.php diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index a976d6d..911d001 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -19,7 +19,7 @@ jobs: id: build-image uses: redhat-actions/buildah-build@v2 env: - COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.COMPOSER_AUTH_JSON }}"} }' + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: image: fsw-openshift tags: latest diff --git a/lang/en/auth.php b/lang/en/auth.php new file mode 100644 index 0000000..6598e2c --- /dev/null +++ b/lang/en/auth.php @@ -0,0 +1,20 @@ + 'These credentials do not match our records.', + 'password' => 'The provided password is incorrect.', + 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', + +]; diff --git a/lang/en/pagination.php b/lang/en/pagination.php new file mode 100644 index 0000000..d481411 --- /dev/null +++ b/lang/en/pagination.php @@ -0,0 +1,19 @@ + '« Previous', + 'next' => 'Next »', + +]; diff --git a/lang/en/passwords.php b/lang/en/passwords.php new file mode 100644 index 0000000..f1223bd --- /dev/null +++ b/lang/en/passwords.php @@ -0,0 +1,22 @@ + 'Your password has been reset.', + 'sent' => 'We have emailed your password reset link.', + 'throttled' => 'Please wait before retrying.', + 'token' => 'This password reset token is invalid.', + 'user' => "We can't find a user with that email address.", + +]; diff --git a/lang/en/validation.php b/lang/en/validation.php new file mode 100644 index 0000000..8dbe37f --- /dev/null +++ b/lang/en/validation.php @@ -0,0 +1,191 @@ + 'The :attribute field must be accepted.', + 'accepted_if' => 'The :attribute field must be accepted when :other is :value.', + 'active_url' => 'The :attribute field must be a valid URL.', + 'after' => 'The :attribute field must be a date after :date.', + 'after_or_equal' => 'The :attribute field must be a date after or equal to :date.', + 'alpha' => 'The :attribute field must only contain letters.', + 'alpha_dash' => 'The :attribute field must only contain letters, numbers, dashes, and underscores.', + 'alpha_num' => 'The :attribute field must only contain letters and numbers.', + 'array' => 'The :attribute field must be an array.', + 'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.', + 'before' => 'The :attribute field must be a date before :date.', + 'before_or_equal' => 'The :attribute field must be a date before or equal to :date.', + 'between' => [ + 'array' => 'The :attribute field must have between :min and :max items.', + 'file' => 'The :attribute field must be between :min and :max kilobytes.', + 'numeric' => 'The :attribute field must be between :min and :max.', + 'string' => 'The :attribute field must be between :min and :max characters.', + ], + 'boolean' => 'The :attribute field must be true or false.', + 'can' => 'The :attribute field contains an unauthorized value.', + 'confirmed' => 'The :attribute field confirmation does not match.', + 'current_password' => 'The password is incorrect.', + 'date' => 'The :attribute field must be a valid date.', + 'date_equals' => 'The :attribute field must be a date equal to :date.', + 'date_format' => 'The :attribute field must match the format :format.', + 'decimal' => 'The :attribute field must have :decimal decimal places.', + 'declined' => 'The :attribute field must be declined.', + 'declined_if' => 'The :attribute field must be declined when :other is :value.', + 'different' => 'The :attribute field and :other must be different.', + 'digits' => 'The :attribute field must be :digits digits.', + 'digits_between' => 'The :attribute field must be between :min and :max digits.', + 'dimensions' => 'The :attribute field has invalid image dimensions.', + 'distinct' => 'The :attribute field has a duplicate value.', + 'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.', + 'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.', + 'email' => 'The :attribute field must be a valid email address.', + 'ends_with' => 'The :attribute field must end with one of the following: :values.', + 'enum' => 'The selected :attribute is invalid.', + 'exists' => 'The selected :attribute is invalid.', + 'extensions' => 'The :attribute field must have one of the following extensions: :values.', + 'file' => 'The :attribute field must be a file.', + 'filled' => 'The :attribute field must have a value.', + 'gt' => [ + 'array' => 'The :attribute field must have more than :value items.', + 'file' => 'The :attribute field must be greater than :value kilobytes.', + 'numeric' => 'The :attribute field must be greater than :value.', + 'string' => 'The :attribute field must be greater than :value characters.', + ], + 'gte' => [ + 'array' => 'The :attribute field must have :value items or more.', + 'file' => 'The :attribute field must be greater than or equal to :value kilobytes.', + 'numeric' => 'The :attribute field must be greater than or equal to :value.', + 'string' => 'The :attribute field must be greater than or equal to :value characters.', + ], + 'hex_color' => 'The :attribute field must be a valid hexadecimal color.', + 'image' => 'The :attribute field must be an image.', + 'in' => 'The selected :attribute is invalid.', + 'in_array' => 'The :attribute field must exist in :other.', + 'integer' => 'The :attribute field must be an integer.', + 'ip' => 'The :attribute field must be a valid IP address.', + 'ipv4' => 'The :attribute field must be a valid IPv4 address.', + 'ipv6' => 'The :attribute field must be a valid IPv6 address.', + 'json' => 'The :attribute field must be a valid JSON string.', + 'lowercase' => 'The :attribute field must be lowercase.', + 'lt' => [ + 'array' => 'The :attribute field must have less than :value items.', + 'file' => 'The :attribute field must be less than :value kilobytes.', + 'numeric' => 'The :attribute field must be less than :value.', + 'string' => 'The :attribute field must be less than :value characters.', + ], + 'lte' => [ + 'array' => 'The :attribute field must not have more than :value items.', + 'file' => 'The :attribute field must be less than or equal to :value kilobytes.', + 'numeric' => 'The :attribute field must be less than or equal to :value.', + 'string' => 'The :attribute field must be less than or equal to :value characters.', + ], + 'mac_address' => 'The :attribute field must be a valid MAC address.', + 'max' => [ + 'array' => 'The :attribute field must not have more than :max items.', + 'file' => 'The :attribute field must not be greater than :max kilobytes.', + 'numeric' => 'The :attribute field must not be greater than :max.', + 'string' => 'The :attribute field must not be greater than :max characters.', + ], + 'max_digits' => 'The :attribute field must not have more than :max digits.', + 'mimes' => 'The :attribute field must be a file of type: :values.', + 'mimetypes' => 'The :attribute field must be a file of type: :values.', + 'min' => [ + 'array' => 'The :attribute field must have at least :min items.', + 'file' => 'The :attribute field must be at least :min kilobytes.', + 'numeric' => 'The :attribute field must be at least :min.', + 'string' => 'The :attribute field must be at least :min characters.', + ], + 'min_digits' => 'The :attribute field must have at least :min digits.', + 'missing' => 'The :attribute field must be missing.', + 'missing_if' => 'The :attribute field must be missing when :other is :value.', + 'missing_unless' => 'The :attribute field must be missing unless :other is :value.', + 'missing_with' => 'The :attribute field must be missing when :values is present.', + 'missing_with_all' => 'The :attribute field must be missing when :values are present.', + 'multiple_of' => 'The :attribute field must be a multiple of :value.', + 'not_in' => 'The selected :attribute is invalid.', + 'not_regex' => 'The :attribute field format is invalid.', + 'numeric' => 'The :attribute field must be a number.', + 'password' => [ + 'letters' => 'The :attribute field must contain at least one letter.', + 'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.', + 'numbers' => 'The :attribute field must contain at least one number.', + 'symbols' => 'The :attribute field must contain at least one symbol.', + 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.', + ], + 'present' => 'The :attribute field must be present.', + 'present_if' => 'The :attribute field must be present when :other is :value.', + 'present_unless' => 'The :attribute field must be present unless :other is :value.', + 'present_with' => 'The :attribute field must be present when :values is present.', + 'present_with_all' => 'The :attribute field must be present when :values are present.', + 'prohibited' => 'The :attribute field is prohibited.', + 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', + 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', + 'prohibits' => 'The :attribute field prohibits :other from being present.', + 'regex' => 'The :attribute field format is invalid.', + 'required' => 'The :attribute field is required.', + 'required_array_keys' => 'The :attribute field must contain entries for: :values.', + 'required_if' => 'The :attribute field is required when :other is :value.', + 'required_if_accepted' => 'The :attribute field is required when :other is accepted.', + 'required_unless' => 'The :attribute field is required unless :other is in :values.', + 'required_with' => 'The :attribute field is required when :values is present.', + 'required_with_all' => 'The :attribute field is required when :values are present.', + 'required_without' => 'The :attribute field is required when :values is not present.', + 'required_without_all' => 'The :attribute field is required when none of :values are present.', + 'same' => 'The :attribute field must match :other.', + 'size' => [ + 'array' => 'The :attribute field must contain :size items.', + 'file' => 'The :attribute field must be :size kilobytes.', + 'numeric' => 'The :attribute field must be :size.', + 'string' => 'The :attribute field must be :size characters.', + ], + 'starts_with' => 'The :attribute field must start with one of the following: :values.', + 'string' => 'The :attribute field must be a string.', + 'timezone' => 'The :attribute field must be a valid timezone.', + 'unique' => 'The :attribute has already been taken.', + 'uploaded' => 'The :attribute failed to upload.', + 'uppercase' => 'The :attribute field must be uppercase.', + 'url' => 'The :attribute field must be a valid URL.', + 'ulid' => 'The :attribute field must be a valid ULID.', + 'uuid' => 'The :attribute field must be a valid UUID.', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap our attribute placeholder + | with something more reader friendly such as "E-Mail Address" instead + | of "email". This simply helps us make our message more expressive. + | + */ + + 'attributes' => [], + +]; From a445376c06304c68a0a5b857ea54a3f8528a5cd8 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 28 Jun 2024 17:46:24 +0200 Subject: [PATCH 63/78] Added gittoken. --- openshift/openshift.dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openshift/openshift.dockerfile b/openshift/openshift.dockerfile index 49a19f7..191d655 100644 --- a/openshift/openshift.dockerfile +++ b/openshift/openshift.dockerfile @@ -22,6 +22,8 @@ RUN apt-get install -y libmcrypt-dev \ && 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 From 02837fc31b3e35dad008e53cc59c1464c7a37ce7 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 28 Jun 2024 17:49:35 +0200 Subject: [PATCH 64/78] Added gittoken. 3 --- .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 911d001..4ba9348 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -20,6 +20,8 @@ jobs: uses: redhat-actions/buildah-build@v2 env: COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} + COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.COMPOSER_AUTH_JSON }}"} }' with: image: fsw-openshift tags: latest From 472ad7834fce104380738293d2c44ce64395ece3 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 28 Jun 2024 18:09:50 +0200 Subject: [PATCH 65/78] Added gittoken. 3 --- .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 4ba9348..8cb9e9f 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -19,9 +19,8 @@ jobs: id: build-image uses: redhat-actions/buildah-build@v2 env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} - COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.COMPOSER_AUTH_JSON }}"} }' + env: + GITHUB_TOKEN: ${{ github.token }} with: image: fsw-openshift tags: latest From e5d477a0bdc7cffdb6783084f2396bb4054abd2b Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 28 Jun 2024 18:13:32 +0200 Subject: [PATCH 66/78] Added gittoken. 3 --- .github/workflows/docker-image-Laravel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 8cb9e9f..64ec24c 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -19,8 +19,8 @@ jobs: id: build-image uses: redhat-actions/buildah-build@v2 env: - env: - GITHUB_TOKEN: ${{ github.token }} + GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} + github_token: ${{ secrets.ACCESS_TOKEN_GITHUB }} with: image: fsw-openshift tags: latest From dc288d82cf76917cd641137586f290fb89b75201 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 28 Jun 2024 18:17:39 +0200 Subject: [PATCH 67/78] Added gittoken. 4 --- .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 64ec24c..54082e2 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -19,6 +19,8 @@ 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 }} github_token: ${{ secrets.ACCESS_TOKEN_GITHUB }} with: From 975658f3cab271ebf00625a41d68bc02df1af901 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 28 Jun 2024 18:18:36 +0200 Subject: [PATCH 68/78] Added gittoken. 5 --- .github/workflows/docker-image-Laravel.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 54082e2..0db88f4 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -22,7 +22,6 @@ jobs: COMPOSER_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{secrets.ACCESS_TOKEN_GITHUB}}"} }' # [tl! **] GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} - github_token: ${{ secrets.ACCESS_TOKEN_GITHUB }} with: image: fsw-openshift tags: latest From ccde1fd9534ad6de2288b7182bbd97023dc457ff Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Fri, 28 Jun 2024 18:22:33 +0200 Subject: [PATCH 69/78] Added gittoken. 5 --- .github/workflows/docker-image-Laravel.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 0db88f4..3529b52 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -5,6 +5,9 @@ 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 }} on: push: branches: [ "master", "develop", "feature/da_add_la_basepackage"] @@ -18,10 +21,6 @@ jobs: - name: Build from Dockerfile 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 6f3c115efcfce70060a73d4dec4414571bd9eb37 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 09:32:53 +0200 Subject: [PATCH 70/78] Added gittoken. 6 --- docker/backend.dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docker/backend.dockerfile b/docker/backend.dockerfile index e504805..e8ba2bd 100644 --- a/docker/backend.dockerfile +++ b/docker/backend.dockerfile @@ -45,7 +45,14 @@ 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 + #COPY ./docker/auth.json /root/.composer/auth.json +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 From 3e68778099c8fd207b816a45485393290b74c93b Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 09:38:46 +0200 Subject: [PATCH 71/78] Added gittoken. 7 --- docker/backend.dockerfile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docker/backend.dockerfile b/docker/backend.dockerfile index e8ba2bd..f867c81 100644 --- a/docker/backend.dockerfile +++ b/docker/backend.dockerfile @@ -6,25 +6,25 @@ WORKDIR /var/www # upgrades! RUN apt-get update -RUN apt-get -y dist-upgrade -RUN apt-get install -y zip +RUN apt-get -y -qq dist-upgrade +RUN apt-get install -y -qq zip -RUN apt-get install -y sudo nano -RUN apt-get install -y mariadb-client +RUN apt-get install -y -qq sudo nano +RUN apt-get install -y -qq mariadb-client -RUN apt-get install -y libonig-dev -RUN apt-get install -y ca-certificates curl gnupg +RUN apt-get install -y -qq libonig-dev +RUN apt-get install -y -qq ca-certificates curl gnupg # required for sending mail. -RUN apt-get install -y sendmail -RUN apt-get install -y libzip-dev -RUN apt-get install -y zlib1g-dev +RUN apt-get install -y -qq sendmail +RUN apt-get install -y -qq libzip-dev +RUN apt-get install -y -qq zlib1g-dev # install mysql RUN docker-php-ext-install pdo_mysql mysqli # install additional PHP extensions -RUN apt-get install -y libmcrypt-dev \ +RUN apt-get install -y -qq libmcrypt-dev \ libmagickwand-dev --no-install-recommends \ && pecl install mcrypt-1.0.7 \ && docker-php-ext-install pdo_mysql \ From 11327c73b60dc158e763bac1fb268094fdf9136e Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 10:04:50 +0200 Subject: [PATCH 72/78] Added gittoken. 8 --- docker/backend.dockerfile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docker/backend.dockerfile b/docker/backend.dockerfile index f867c81..f9effce 100644 --- a/docker/backend.dockerfile +++ b/docker/backend.dockerfile @@ -6,25 +6,25 @@ WORKDIR /var/www # upgrades! RUN apt-get update -RUN apt-get -y -qq dist-upgrade -RUN apt-get install -y -qq zip +RUN apt-get -qq dist-upgrade -y +RUN apt-get -qq install -y zip -RUN apt-get install -y -qq sudo nano -RUN apt-get install -y -qq mariadb-client +RUN apt-get -qq install -y sudo nano +RUN apt-get -qq install -y mariadb-client -RUN apt-get install -y -qq libonig-dev -RUN apt-get install -y -qq ca-certificates curl gnupg +RUN apt-get -qq install -y libonig-dev +RUN apt-get -qq install -y ca-certificates curl gnupg # required for sending mail. -RUN apt-get install -y -qq sendmail -RUN apt-get install -y -qq libzip-dev -RUN apt-get install -y -qq zlib1g-dev +RUN apt-get -qq install -y sendmail +RUN apt-get -qq install -y libzip-dev +RUN apt-get -qq install -y zlib1g-dev # install mysql RUN docker-php-ext-install pdo_mysql mysqli # install additional PHP extensions -RUN apt-get install -y -qq 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 \ @@ -48,7 +48,7 @@ COPY .. /var/www #COPY ./docker/auth.json /root/.composer/auth.json RUN echo "COMPOSER_TOKEN" RUN echo $(COMPOSER_TOKEN) -RUN echo "GITHUB_TOKEN"" +RUN echo "GITHUB_TOKEN" RUN echo $(GITHUB_TOKEN) RUN echo "COMPOSER_AUTH" RUN echo $(COMPOSER_AUTH) > /root/.composer/auth.json From 7597d8e9f3729dae9a06b7137e0fd717e7d83a1f Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 10:05:44 +0200 Subject: [PATCH 73/78] Test direct op develop. Actions worden anders niet goed meegenomen. --- .github/workflows/docker-image-Laravel.yml | 41 ++++++++++++---------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/.github/workflows/docker-image-Laravel.yml b/.github/workflows/docker-image-Laravel.yml index 4b02441..d959668 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -5,30 +5,33 @@ 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 }} on: push: - branches: [ "master", "develop", "feature/da_opschonen"] + branches: [ "master", "develop", "feature/da_add_la_basepackage"] pull_request: branches: [ "master" ] jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Build from Dockerfile - id: build-image - uses: redhat-actions/buildah-build@v2 - with: - 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 + - uses: actions/checkout@v4 + - name: Build from Dockerfile + id: build-image + uses: redhat-actions/buildah-build@v2 + with: + 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 From 89d8675cb649494b3bdfe7a0f56ed77a66a000eb Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 10:09:12 +0200 Subject: [PATCH 74/78] Nog een test --- docker/backend.dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/backend.dockerfile b/docker/backend.dockerfile index f9effce..24635d9 100644 --- a/docker/backend.dockerfile +++ b/docker/backend.dockerfile @@ -47,6 +47,7 @@ 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) From 30b4a7ee071c2f1ff3370f2ce7933194a1e1ceb1 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 10:21:07 +0200 Subject: [PATCH 75/78] Nog een test met tags --- .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 d959668..23a9a91 100644 --- a/.github/workflows/docker-image-Laravel.yml +++ b/.github/workflows/docker-image-Laravel.yml @@ -23,7 +23,7 @@ jobs: uses: redhat-actions/buildah-build@v2 with: image: fsw-openshift - tags: latest + tags: latest develop dockerfiles: | ./openshift/openshift.dockerfile - name: Push to registry From 2435f3b071624b2b40134088486884f98fc832f6 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 10:31:29 +0200 Subject: [PATCH 76/78] Nog een test met tags --- docker/backend.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/backend.dockerfile b/docker/backend.dockerfile index 24635d9..598e2a5 100644 --- a/docker/backend.dockerfile +++ b/docker/backend.dockerfile @@ -6,7 +6,7 @@ WORKDIR /var/www # upgrades! RUN apt-get update -RUN apt-get -qq dist-upgrade -y +RUN apt-get -y dist-upgrade RUN apt-get -qq install -y zip RUN apt-get -qq install -y sudo nano From 03457b2122987f0269c964821ba24eb011748612 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 10:32:18 +0200 Subject: [PATCH 77/78] Nog een test met tags --- docker/backend.dockerfile | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/docker/backend.dockerfile b/docker/backend.dockerfile index d1eb1f1..598e2a5 100644 --- a/docker/backend.dockerfile +++ b/docker/backend.dockerfile @@ -7,16 +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 ca-certificates curl gnupg + +# required for sending mail. +RUN apt-get -qq install -y sendmail +RUN apt-get -qq install -y libzip-dev +RUN apt-get -qq install -y zlib1g-dev # 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 \ @@ -24,6 +32,11 @@ RUN apt-get install -y libmcrypt-dev \ RUN apt-get clean -y +# email configuration +RUN echo "sendmail_path='/usr/sbin/sendmail -t -i --smtp-addr=\"mail.docker:1025\"'" >> /usr/local/etc/php/conf.d/sendmail.ini +RUN sed -i '/#!\/bin\/sh/aservice sendmail restart' /usr/local/bin/docker-php-entrypoint +RUN sed -i '/#!\/bin\/sh/aecho "$(hostname -i)\t$(hostname) $(hostname).localhost" >> /etc/hosts' /usr/local/bin/docker-php-entrypoint + # set corrent TimeZone ENV TZ=Europe/Amsterdam RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone @@ -31,13 +44,20 @@ 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 RUN composer install -## TODO eigenlijk wil je een image zonder dev packages. -##RUN composer install --no-dev --no-scripts # install self signed certifcates to thrust other local dev environments COPY ./docker/certificates/docker.dev.crt /usr/local/share/ca-certificates @@ -55,5 +75,6 @@ RUN chmod ugo+x /entrypoint.sh RUN php artisan optimize ENTRYPOINT /entrypoint.sh +EXPOSE 9000 CMD ["php-fpm"] From c6ffb6db380718cd5f24bb90177743a95ab88b57 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 1 Jul 2024 10:36:59 +0200 Subject: [PATCH 78/78] En nu? --- docker/backend.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/backend.dockerfile b/docker/backend.dockerfile index 598e2a5..3ed4ffc 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 +RUN apt-get update -y RUN apt-get -y dist-upgrade RUN apt-get -qq install -y zip