Skip to content

Commit

Permalink
Merge pull request #63 from ConductionNL/development
Browse files Browse the repository at this point in the history
Update on logs
  • Loading branch information
rubenvdlinde authored Dec 12, 2019
2 parents 1739340 + d547dcf commit 4de0380
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 8 deletions.
9 changes: 8 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ TRUSTED_HOSTS=^(.+\.)?conduction\.nl$|^(.+\.)?huwelijksplanner\.online$|^(.+\.)?
# Orgization details
##################################################

# The following details describe your organisations and are used for both certificate creation and common-ground.dev
# The following details describe your organisations and are used for both certificate creation, nlx (if active) and common-ground.dev

ORGANIZATION_NAME=Conduction
ORGANIZATION_EMAIL_ADDRESS=[email protected]
Expand All @@ -44,9 +44,15 @@ ORGANIZATION_UNIT_NAME=Common-Ground
# Documentation settings
##################################################

# The primary domain for this API @depracticed
APP_DOMAIN=conduction.nl
# he domains on wich you want to provide this component, the first wil be used as primary (or common in cert-manger terms)
APP_DOMAINS=["conduction.nl","zaakonline.nl","larping.eu","common-ground.dev","trouwplanner.online","huwelijksplanner.online"]
# If set to true wil provide the component on an {APP_NAME}.{APP_DOMAIN} basis for production enviroment, and {APP_NAME}.{APP_ENV}.{APP_DOMAIN} basis for other enviroments. Wil skipp the {APP_NAME}. on both if set to false
APP_USE_NAME_AS_SUBDOMAIN=true
# The demo enviroment for this component @depracticed
APP_DEMO=pc.zaakonline.nl
# he Repository for this component
APP_REPRO=https://github.com/ConductionNL/Proto-component-commonground

##################################################
Expand All @@ -55,6 +61,7 @@ APP_REPRO=https://github.com/ConductionNL/Proto-component-commonground

CONTAINER_REGISTRY_BASE=docker.io/conduction
CONTAINER_PROJECT_NAME=pc
# The repository for the primary (php) container of this project
CONTAINER_REPRO=https://hub.docker.com/repository/docker/conduction/pc-php

##################################################
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
if: (contains( github.ref, 'master' ) || contains( github.ref, 'staging' ) || contains( github.ref, 'development' )) && steps.kubeconfig.outputs.success == 'true'
run: helm upgrade $APP_NAME-$APP_ENV ./api/helm --kubeconfig="kubeconfig.yaml" --namespace=$APP_ENV --set settings.env=$APP_ENV,settings.debug=1
- name: Install through helm
if: failure()
if: failure() && (contains( github.ref, 'master' ) || contains( github.ref, 'staging' ) || contains( github.ref, 'development' )) && steps.kubeconfig.outputs.success == 'true'
run: helm install --name $APP_NAME-$APP_ENV ./api/helm --kubeconfig="kubeconfig.yaml" --namespace=$APP_ENV --set settings.env=$APP_ENV,settings.debug=1
- name: Rollout new containers
if: (contains( github.ref, 'master' ) || contains( github.ref, 'staging' ) || contains( github.ref, 'development' )) && steps.kubeconfig.outputs.success == 'true' && success()
Expand Down
3 changes: 3 additions & 0 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ RUN set -eux; \
chmod +x bin/console; sync
VOLUME /srv/api/var

# Now that we have our own composer lets update
RUN composer update --no-interaction

COPY docker/php/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
RUN chmod +x /usr/local/bin/docker-entrypoint

Expand Down
8 changes: 5 additions & 3 deletions api/helm/templates/certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ spec:
duration: 24h
renewBefore: 12h
dnsNames:
{{- if eq .Values.settings.env "prod" }}
- {{ .Values.settings.name }}.{{ .Values.settings.domain }}
{{- range .Values.settings.domains }}
{{- if eq $.Values.settings.env "prod" }}
- {{ $.Values.settings.name }}.{{ . }}
{{- else }}
- {{ .Values.settings.name }}.{{ .Values.settings.env }}.{{ .Values.settings.domain }}
- {{ $.Values.settings.name }}.{{ $.Values.settings.env }}.{{ . }}
{{- end }}
{{- end }}
issuerRef:
name: {{ include "name" . }}-{{ .Values.settings.env }}-letsencrypt
Expand Down
6 changes: 4 additions & 2 deletions api/helm/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ spec:
- hosts:
# {{- range .Values.settings.domains }}
# - {{ .domain | quote }}
# {{- end }}
- {{ .Values.settings.domain }}
# {{- end }}
{{- with .Values.settings.domains }}
{{- toYaml . | nindent 4 }}
{{- end }}
secretName: {{ include "name" . }}-{{ .Values.settings.env }}-cert
rules:
# - host: {{ .Values.settings.name }}.{{ .Values.settings.env }}.{{ .Values.settings.domain }}
Expand Down
5 changes: 4 additions & 1 deletion api/src/Swagger/SwaggerDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ public function normalize($object, $format = null, array $context = [])

//$additionalEntityDocs = $this->getAdditionalEntityDocs($entity);
$entityDocs = $this->getAdditionalEntityDocs($entity);
$additionalDocs = array_merge($additionalDocs, $entityDocs['properties']);
// Only run if we have aditional docs
if(in_array('properties',$entityDocs)){
$additionalDocs = array_merge($additionalDocs, $entityDocs['properties']);
}

// Security
$docs['securityDefinitions']['JWT-Oauth']['scopes'] = array_merge($docs['securityDefinitions']['JWT-Oauth']['scopes'], $entityDocs['security']);
Expand Down

0 comments on commit 4de0380

Please sign in to comment.