From 12732fd0538551c39909da97f5979cfd14fab00c Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Wed, 1 Jan 2020 10:31:52 +0100 Subject: [PATCH 01/12] update on dependencies --- api/composer.json | 6 +++--- api/public/schema/publiccode.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/composer.json b/api/composer.json index d04d452a..b69f6993 100644 --- a/api/composer.json +++ b/api/composer.json @@ -29,9 +29,9 @@ "webonyx/graphql-php": "^0.13.8" }, "require-dev" : { - "api-platform/schema-generator" : "^2.1", - "symfony/maker-bundle" : "^1.11", - "symfony/profiler-pack" : "^1.0" + "api-platform/schema-generator": "^2.1", + "symfony/maker-bundle": "^1.11", + "symfony/profiler-pack": "^1.0" }, "config" : { "preferred-install" : { diff --git a/api/public/schema/publiccode.yaml b/api/public/schema/publiccode.yaml index 67ea1827..66f44a92 100644 --- a/api/public/schema/publiccode.yaml +++ b/api/public/schema/publiccode.yaml @@ -6,7 +6,7 @@ url: "https://github.com/ConductionNL/Proto-component-commonground" landingURL: "pc.zaakonline.nl" isBasedOn: "https://github.com/ConductionNL/Proto-component-commonground.git" softwareVersion: "V.0.1" -releaseDate: "2019-28-12" +releaseDate: "2020-01-01" logo: pc.zaakonline.nl monochromeLogo: img/logo-mono.svg From 1e09b51a2d6ca17bf882499d0cce099dcaa57992 Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Fri, 3 Jan 2020 17:23:38 +0100 Subject: [PATCH 02/12] removed vng.cloud --- .env | 2 +- .github/workflows/dockerimage.yml | 1 + api/src/Entity/ExampleEntity.php | 15 ++++++++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.env b/.env index e96a94ad..d41ad5c2 100644 --- a/.env +++ b/.env @@ -29,7 +29,7 @@ APP_HOME=pc.zaakonline.nl # The urls on wich this api is available TRUSTED_PROXIES=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 -TRUSTED_HOSTS=^(.+\.)?conduction\.nl$|^(.+\.)?vng\.cloud$|^(.+\.)?huwelijksplanner\.online$|^(.+\.)?larping\.eu$|^(.+\.)?common-ground\.dev$|^(.+\.)?trouwplanner\.online$|^(.+\.)?zaakonline\.nl$|localhost +TRUSTED_HOSTS=^(.+\.)?conduction\.nl$|^(.+\.)?huwelijksplanner\.online$|^(.+\.)?larping\.eu$|^(.+\.)?common-ground\.dev$|^(.+\.)?trouwplanner\.online$|^(.+\.)?zaakonline\.nl$|localhost ################################################## # Orgization details diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index 5be324ee..96e29ebb 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -34,6 +34,7 @@ jobs: if: contains( github.ref, 'master' ) || contains( github.base_ref, 'master' ) run: | echo ::set-env name=APP_ENV::prod + echo ::set-env name=APP_BUILD::prod echo "set APP_ENV to $APP_ENV" - name: Set APP_BUILD to APP_VERSION if: contains( github.ref, 'master' ) diff --git a/api/src/Entity/ExampleEntity.php b/api/src/Entity/ExampleEntity.php index 47705b5c..2e65a2ba 100644 --- a/api/src/Entity/ExampleEntity.php +++ b/api/src/Entity/ExampleEntity.php @@ -11,6 +11,7 @@ use Gedmo\Mapping\Annotation as Gedmo; use Symfony\Component\Serializer\Annotation\Groups; use Symfony\Component\Validator\Constraints as Assert; +use Ramsey\Uuid\Uuid; /** * This is an example entity. @@ -91,10 +92,18 @@ class ExampleEntity * @ORM\Column(type="string", length=255, nullable=true) */ private $camelCase; - - public function getId(): ?int + + + public function getId(): Uuid + { + return $this->id; + } + + public function setId(Uuid $id): self { - return $this->id; + $this->id = $id; + + return $this; } public function getName(): ?string From 518ceb288e190ba3f35f5aa9bb915d4dc6ce3104 Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Fri, 3 Jan 2020 18:28:44 +0100 Subject: [PATCH 03/12] Moved public code from dockerfile to entrypoint --- api/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index 24fae412..5036a777 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -117,8 +117,7 @@ CMD ["php-fpm"] # Let update the docs to show the latest chages # RUN bin/console api:swagger:export --output=/srv/api/public/schema/openapi.yaml --yaml --spec-version=3 - -RUN bin/console app:publiccode:update --location=/srv/api/public/schema/ --spec-version=0.2 +# RUN bin/console app:publiccode:update --location=/srv/api/public/schema/ --spec-version=0.2 ############################# # "nginx" stage # From c64be66ce1be3fdbc8b4cc0b37d75312fa6a5b10 Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Sun, 5 Jan 2020 15:54:12 +0100 Subject: [PATCH 04/12] domain to domains --- api/helm/templates/configmap.yaml | 2 +- api/helm/templates/php-deployment.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/helm/templates/configmap.yaml b/api/helm/templates/configmap.yaml index 41f37e42..dd422b1c 100644 --- a/api/helm/templates/configmap.yaml +++ b/api/helm/templates/configmap.yaml @@ -16,7 +16,7 @@ data: app-version: {{ .Values.settings.version | quote }} app-repro: {{ .Values.settings.repro | quote }} app-demo: {{ .Values.settings.demo | quote }} - app-domain: {{ .Values.settings.domain | quote }} + app-domains: {{ .Values.settings.domains | quote }} app-description: {{ .Values.settings.description | quote }} app-auth: {{ .Values.settings.authorisationEnabled | quote }} diff --git a/api/helm/templates/php-deployment.yaml b/api/helm/templates/php-deployment.yaml index 2d5df508..814d4fc6 100644 --- a/api/helm/templates/php-deployment.yaml +++ b/api/helm/templates/php-deployment.yaml @@ -77,11 +77,11 @@ spec: configMapKeyRef: name: {{ template "fullname" . }} key: app-demo - - name: APP_DOMAIN + - name: APP_DOMAINS valueFrom: configMapKeyRef: name: {{ template "fullname" . }} - key: app-domain + key: app-domains # organization - name: ORGANIZATION_NAME valueFrom: From e6efdbdc8b0bfc4864e285aa9f69655dcb281a5d Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Sun, 5 Jan 2020 16:30:53 +0100 Subject: [PATCH 05/12] included the domains as a json value --- api/config/packages/twig.yaml | 3 ++- api/helm/templates/configmap.yaml | 3 ++- api/helm/templates/php-deployment.yaml | 2 +- api/helm/values.yaml | 1 + api/templates/helm/Values.yaml.twig | 1 + 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/api/config/packages/twig.yaml b/api/config/packages/twig.yaml index 0f182e22..eaef80d6 100644 --- a/api/config/packages/twig.yaml +++ b/api/config/packages/twig.yaml @@ -57,7 +57,8 @@ twig: app_env: '%env(APP_ENV)%' app_debug: '%env(APP_DEBUG)%' app_subdomain: '%env(APP_SUBDOMAIN)%' - app_domains: '%env(json:APP_DOMAINS)%' + app_domains: '%env(json:APP_DOMAINS)%' + app_domains_json: '%env(APP_DOMAINS)%' app_demo: '%env(APP_DEMO)%' app_repro: '%env(APP_REPRO)%' app_description: '%env(APP_DESCRIPTION)%' diff --git a/api/helm/templates/configmap.yaml b/api/helm/templates/configmap.yaml index dd422b1c..77e68c78 100644 --- a/api/helm/templates/configmap.yaml +++ b/api/helm/templates/configmap.yaml @@ -16,7 +16,8 @@ data: app-version: {{ .Values.settings.version | quote }} app-repro: {{ .Values.settings.repro | quote }} app-demo: {{ .Values.settings.demo | quote }} - app-domains: {{ .Values.settings.domains | quote }} + app-domains: {{ .Values.settings.domains | quote }} + app-domains-json: {{ .Values.settings.domainsJson | quote }} app-description: {{ .Values.settings.description | quote }} app-auth: {{ .Values.settings.authorisationEnabled | quote }} diff --git a/api/helm/templates/php-deployment.yaml b/api/helm/templates/php-deployment.yaml index 814d4fc6..d438ac3e 100644 --- a/api/helm/templates/php-deployment.yaml +++ b/api/helm/templates/php-deployment.yaml @@ -81,7 +81,7 @@ spec: valueFrom: configMapKeyRef: name: {{ template "fullname" . }} - key: app-domains + key: app-domains-json # organization - name: ORGANIZATION_NAME valueFrom: diff --git a/api/helm/values.yaml b/api/helm/values.yaml index c9735c5b..4ebf495f 100644 --- a/api/helm/values.yaml +++ b/api/helm/values.yaml @@ -16,6 +16,7 @@ settings: - zaakonline.nl - huwelijksplanner.online - common-ground.dev + domainsJson: ["conduction.nl","zaakonline.nl","huwelijksplanner.online","common-ground.dev"] organisationName: Conduction email: info@conduction.nl country: Netherlands diff --git a/api/templates/helm/Values.yaml.twig b/api/templates/helm/Values.yaml.twig index a328bd6b..afbd21ad 100644 --- a/api/templates/helm/Values.yaml.twig +++ b/api/templates/helm/Values.yaml.twig @@ -15,6 +15,7 @@ settings: {% for domain in app_domains %} - {{ domain }} {% endfor %} + domains_json: {{ app_domains_json }} organisationName: {{ organization_name }} email: {{ organization_email }} country: {{ organization_country }} From 90f2fc8bf2496d367f5f42dbc223f6d12c1aa276 Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Sun, 5 Jan 2020 16:55:55 +0100 Subject: [PATCH 06/12] domains from json --- api/config/packages/twig.yaml | 1 - api/templates/helm/Values.yaml.twig | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/api/config/packages/twig.yaml b/api/config/packages/twig.yaml index eaef80d6..5a403c45 100644 --- a/api/config/packages/twig.yaml +++ b/api/config/packages/twig.yaml @@ -58,7 +58,6 @@ twig: app_debug: '%env(APP_DEBUG)%' app_subdomain: '%env(APP_SUBDOMAIN)%' app_domains: '%env(json:APP_DOMAINS)%' - app_domains_json: '%env(APP_DOMAINS)%' app_demo: '%env(APP_DEMO)%' app_repro: '%env(APP_REPRO)%' app_description: '%env(APP_DESCRIPTION)%' diff --git a/api/templates/helm/Values.yaml.twig b/api/templates/helm/Values.yaml.twig index afbd21ad..25054083 100644 --- a/api/templates/helm/Values.yaml.twig +++ b/api/templates/helm/Values.yaml.twig @@ -15,7 +15,7 @@ settings: {% for domain in app_domains %} - {{ domain }} {% endfor %} - domains_json: {{ app_domains_json }} + domains_json: {{ app_domains_json | json_encode() }} organisationName: {{ organization_name }} email: {{ organization_email }} country: {{ organization_country }} From f8162de61f4b72f353922886a11b83fffb9687f8 Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Sun, 5 Jan 2020 17:21:04 +0100 Subject: [PATCH 07/12] fix on non-exisiting variable --- api/templates/helm/Values.yaml.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/templates/helm/Values.yaml.twig b/api/templates/helm/Values.yaml.twig index 25054083..320d577f 100644 --- a/api/templates/helm/Values.yaml.twig +++ b/api/templates/helm/Values.yaml.twig @@ -15,7 +15,7 @@ settings: {% for domain in app_domains %} - {{ domain }} {% endfor %} - domains_json: {{ app_domains_json | json_encode() }} + domains_json: {{ app_domains | json_encode() }} organisationName: {{ organization_name }} email: {{ organization_email }} country: {{ organization_country }} From 4e898db2108495eee2d1d51c12142463cea0e2b3 Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Sun, 5 Jan 2020 17:51:39 +0100 Subject: [PATCH 08/12] fix on value file --- api/templates/helm/Values.yaml.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/templates/helm/Values.yaml.twig b/api/templates/helm/Values.yaml.twig index 320d577f..12233fc4 100644 --- a/api/templates/helm/Values.yaml.twig +++ b/api/templates/helm/Values.yaml.twig @@ -15,7 +15,7 @@ settings: {% for domain in app_domains %} - {{ domain }} {% endfor %} - domains_json: {{ app_domains | json_encode() }} + domainsJson: {{ app_domains | json_encode() }} organisationName: {{ organization_name }} email: {{ organization_email }} country: {{ organization_country }} From ead310efecabfcf0cea01a3cbc543378e74d0d20 Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Sun, 5 Jan 2020 18:32:57 +0100 Subject: [PATCH 09/12] dump raw unsafe values --- api/templates/helm/Values.yaml.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/templates/helm/Values.yaml.twig b/api/templates/helm/Values.yaml.twig index 12233fc4..ced66e43 100644 --- a/api/templates/helm/Values.yaml.twig +++ b/api/templates/helm/Values.yaml.twig @@ -15,7 +15,7 @@ settings: {% for domain in app_domains %} - {{ domain }} {% endfor %} - domainsJson: {{ app_domains | json_encode() }} + domainsJson: {{ app_domains | json_encode()| e }} organisationName: {{ organization_name }} email: {{ organization_email }} country: {{ organization_country }} From 0fa4c044a75ebcfd3b2016cb0587e78e28c672e0 Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Sun, 5 Jan 2020 18:54:38 +0100 Subject: [PATCH 10/12] fixed raw dump --- api/templates/helm/Values.yaml.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/templates/helm/Values.yaml.twig b/api/templates/helm/Values.yaml.twig index ced66e43..10375e26 100644 --- a/api/templates/helm/Values.yaml.twig +++ b/api/templates/helm/Values.yaml.twig @@ -15,7 +15,7 @@ settings: {% for domain in app_domains %} - {{ domain }} {% endfor %} - domainsJson: {{ app_domains | json_encode()| e }} + domainsJson: {{ app_domains | json_encode()|raw }} organisationName: {{ organization_name }} email: {{ organization_email }} country: {{ organization_country }} From cde5820af43970f39e82dd7e4cd6626e039d961e Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Sun, 5 Jan 2020 20:24:34 +0100 Subject: [PATCH 11/12] Test --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index d41ad5c2..dfe3cdd5 100644 --- a/.env +++ b/.env @@ -81,7 +81,7 @@ NOTIFICATION_ENABLED_AUTHORIZATION=sasd ################################################## AUTH_ENABLED=false -AUTH_PROVIDER=sasd +AUTH_PROVIDER=sasdadad AUTH_AUTHORIZATION=sasd ################################################## From 896d8da9cde626a3c39967f3f47f42c2b53ae05f Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Sun, 5 Jan 2020 20:55:18 +0100 Subject: [PATCH 12/12] test --- api/helm/templates/php-deployment.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/api/helm/templates/php-deployment.yaml b/api/helm/templates/php-deployment.yaml index d438ac3e..347f1381 100644 --- a/api/helm/templates/php-deployment.yaml +++ b/api/helm/templates/php-deployment.yaml @@ -77,11 +77,6 @@ spec: configMapKeyRef: name: {{ template "fullname" . }} key: app-demo - - name: APP_DOMAINS - valueFrom: - configMapKeyRef: - name: {{ template "fullname" . }} - key: app-domains-json # organization - name: ORGANIZATION_NAME valueFrom: