Skip to content

Commit

Permalink
Merge pull request #7 from manuelmeister/feature/copy-activity
Browse files Browse the repository at this point in the history
Feature/copy activity
  • Loading branch information
pmattmann authored Dec 17, 2023
2 parents fd46abe + 4ea6fd0 commit fccf59d
Show file tree
Hide file tree
Showing 257 changed files with 22,273 additions and 30,412 deletions.
25 changes: 10 additions & 15 deletions .docker-hub/print/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# build stage
FROM node:20.8.1 AS build-stage
FROM node:20.9.0 AS build-stage
ARG SENTRY_AUTH_TOKEN
ARG SENTRY_ORG
ARG SENTRY_PRINT_PROJECT
Expand All @@ -11,29 +11,24 @@ WORKDIR /app

COPY print/package*.json ./

ENV SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN
ENV SENTRY_ORG=$SENTRY_ORG
ENV SENTRY_PRINT_PROJECT=$SENTRY_PRINT_PROJECT
ENV SENTRY_RELEASE_NAME=$SENTRY_RELEASE_NAME
ENV NUXT_SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN
ENV NUXT_SENTRY_ORG=$SENTRY_ORG
ENV NUXT_SENTRY_PROJECT=$SENTRY_PRINT_PROJECT
ENV NUXT_SENTRY_RELEASE_NAME=$SENTRY_RELEASE_NAME

RUN npm ci

COPY print .
ENV NODE_OPTIONS=--openssl-legacy-provider
RUN npm run build

# production stage
FROM node:20.8.1 AS production-stage
FROM node:20.9.0 AS production-stage
WORKDIR /app

COPY --from=build-stage /app/node_modules ./node_modules
COPY --from=build-stage /app/.nuxt ./.nuxt
COPY --from=build-stage /app/static ./static
COPY --from=build-stage /app/server-middleware ./server-middleware
COPY print/nuxt.config.js .
COPY --from=build-stage /app/.output ./.output

ENV NUXT_HOST 0.0.0.0
ENV NUXT_PORT 80
ENV NITRO_HOST 0.0.0.0
ENV NITRO_PORT 80

EXPOSE 80
CMD ./node_modules/.bin/nuxt start
CMD node ./.output/server/index.mjs
6 changes: 5 additions & 1 deletion .github/workflows/check-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
env:
USER_ID: 1001

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
api-check-dependencies:
name: 'Api Platform check dependencies'
Expand All @@ -22,7 +26,7 @@ jobs:

- uses: shivammathur/setup-php@v2
with:
php-version: '8.2.11'
php-version: '8.2.12'
tools: composer:2.6.0
coverage: xdebug

Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/continuous-integration-optional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
merge_group:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
api-validate-composer-lock:
name: 'Validate Api Platform composer.lock'
Expand All @@ -17,7 +21,7 @@ jobs:

- uses: shivammathur/setup-php@v2
with:
php-version: '8.2.11'
php-version: '8.2.12'
tools: composer:2.6.0
coverage: xdebug

Expand All @@ -32,7 +36,7 @@ jobs:

- uses: shivammathur/setup-php@v2
with:
php-version: '8.2.11'
php-version: '8.2.12'
tools: composer:2.6.0
coverage: xdebug

Expand Down Expand Up @@ -62,7 +66,7 @@ jobs:

- uses: shivammathur/setup-php@v2
with:
php-version: '8.2.11'
php-version: '8.2.12'
tools: composer:2.6.0
coverage: xdebug

Expand Down Expand Up @@ -110,7 +114,7 @@ jobs:

- uses: shivammathur/setup-php@v2
with:
php-version: '8.2.11'
php-version: '8.2.12'
tools: composer:2.6.0
coverage: xdebug

Expand Down
40 changes: 22 additions & 18 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
api-cs-check:
name: 'Lint: API (php-cs-fixer)'
Expand All @@ -29,9 +33,9 @@ jobs:

- uses: shivammathur/setup-php@v2
with:
php-version: '8.2.11'
php-version: '8.2.12'
tools: composer:2.6.0
coverage: xdebug
coverage: none

- name: Get Composer Cache Directory
id: composer-cache
Expand All @@ -57,9 +61,9 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '20.8.1'
node-version: '20.9.0'

- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
with:
Expand All @@ -86,9 +90,9 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '20.8.1'
node-version: '20.9.0'

- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
with:
Expand All @@ -115,9 +119,9 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '20.8.1'
node-version: '20.9.0'

- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
with:
Expand All @@ -144,9 +148,9 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '20.8.1'
node-version: '20.9.0'

- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
with:
Expand Down Expand Up @@ -193,10 +197,10 @@ jobs:

- uses: shivammathur/setup-php@v2
with:
php-version: '8.2.11'
php-version: '8.2.12'
extensions: intl-73.1
tools: composer:2.6.0
coverage: xdebug
coverage: pcov

- name: Get Composer Cache Directory
id: composer-cache
Expand Down Expand Up @@ -247,9 +251,9 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '20.8.1'
node-version: '20.9.0'

- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
with:
Expand Down Expand Up @@ -291,9 +295,9 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '20.8.1'
node-version: '20.9.0'

- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
with:
Expand Down Expand Up @@ -331,9 +335,9 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '20.8.1'
node-version: '20.9.0'

- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/deployment-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
pull_request_target:
types: [opened, reopened, labeled, synchronize]

concurrency:
group: ${{ github.workflow}}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
build-and-push:
if: contains(github.event.pull_request.labels.*.name, 'deploy!')
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/reusable-dev-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ jobs:
--set deployedVersion="$(git rev-parse --short '${{ inputs.sha }}')" \
--set recaptcha.siteKey='${{ secrets.RECAPTCHA_SITE_KEY }}' \
--set recaptcha.secret='${{ secrets.RECAPTCHA_SECRET }}' \
--set featureToggle.developer=true \
--set coupon.secret='${{ secrets.COUPON_SECRET }}'
--set frontend.loginInfoTextKey=${{ vars.LOGIN_INFO_TEXT_KEY }} \
--set featureToggle.developer=true
- name: Finish the GitHub deployment
uses: bobheadxi/[email protected]
Expand Down Expand Up @@ -181,4 +181,4 @@ jobs:
|<span aria-hidden="true">🔨</span> Latest commit | [${{ inputs.sha }}](https://github.com/${{ github.repository }}/commit/${{ inputs.sha }}) |
|<span aria-hidden="true">🔍</span> Latest deploy log | [${{ steps.job-url.outputs.html_url }}](${{ steps.job-url.outputs.html_url }}) |
---
comment_tag: feature-branch-deployment-status
comment_tag: feature-branch-deployment-status
1 change: 0 additions & 1 deletion .github/workflows/reusable-stage-prod-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ jobs:
--set deployedVersion="$(git rev-parse --short HEAD)" \
--set recaptcha.siteKey='${{ secrets.RECAPTCHA_SITE_KEY }}' \
--set recaptcha.secret='${{ secrets.RECAPTCHA_SECRET }}' \
--set coupon.secret='${{ secrets.COUPON_SECRET }}' \
--set frontend.loginInfoTextKey=${{ vars.LOGIN_INFO_TEXT_KEY }} \
--set browserless.maxConcurrentSessions=${{ vars.BROWSERLESS_MAXCONCURRENTSESSIONS || 3 }} \
--set browserless.maxQueueLength=${{ vars.BROWSERLESS_MAXQUEUELENGTH || 9 }} \
Expand Down
5 changes: 0 additions & 5 deletions .helm/ecamp3/templates/api_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ spec:
secretKeyRef:
name: {{ include "api.name" . }}
key: recaptcha-secret
- name: COUPON_SECRET
valueFrom:
secretKeyRef:
name: {{ include "api.name" . }}
key: coupon-secret
{{- if .Values.php.oauth.google.clientId }}
- name: OAUTH_GOOGLE_CLIENT_ID
valueFrom:
Expand Down
5 changes: 0 additions & 5 deletions .helm/ecamp3/templates/api_secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,3 @@ data:
mailer-dsn: {{ .Values.mail.dsn | b64enc | quote }}
{{- end }}
recaptcha-secret: {{ .Values.recaptcha.secret | default "" | b64enc | quote }}
{{- if .Values.coupon.secret }}
coupon-secret: {{ .Values.coupon.secret | printf "%d" | b64enc | quote }}
{{- else }}
coupon-secret: {{ "" | b64enc | quote }}
{{- end }}
13 changes: 6 additions & 7 deletions .helm/ecamp3/templates/print_configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ metadata:
{{- include "print.selectorLabels" . | nindent 4 }}
{{- include "app.commonLabels" . | nindent 4 }}
data:
INTERNAL_API_ROOT_URL: {{ include "api.url" . | quote }}
FRONTEND_URL: {{ include "frontend.url" . | quote }}
PRINT_URL: {{ include "print.url" . | quote }}
COOKIE_PREFIX: {{ include "api.cookiePrefix" . | quote }}
SENTRY_ENVIRONMENT: {{ .Values.domain | quote }}
NUXT_INTERNAL_API_ROOT_URL: {{ include "api.url" . | quote }}
NUXT_PRINT_URL: {{ include "print.url" . | quote }}
NUXT_COOKIE_PREFIX: {{ include "api.cookiePrefix" . | quote }}
NUXT_SENTRY_ENVIRONMENT: {{ .Values.domain | quote }}
{{- if .Values.print.renderHTMLTimeoutMs }}
RENDER_HTML_TIMEOUT_MS: {{ .Values.print.renderHTMLTimeoutMs | quote }}
NUXT_RENDER_HTML_TIMEOUT_MS: {{ .Values.print.renderHTMLTimeoutMs | quote }}
{{- end }}
{{- if .Values.print.renderPDFTimeoutMs }}
RENDER_PDF_TIMEOUT_MS: {{ .Values.print.renderPDFTimeoutMs | quote }}
NXT_RENDER_PDF_TIMEOUT_MS: {{ .Values.print.renderPDFTimeoutMs | quote }}
{{- end }}
12 changes: 6 additions & 6 deletions .helm/ecamp3/templates/print_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ spec:
readinessProbe:
httpGet:
scheme: HTTP
path: /health
path: /print/health
port: 3003
initialDelaySeconds: 10
periodSeconds: 30
timeoutSeconds: 10
livenessProbe:
httpGet:
scheme: HTTP
path: /server/health
path: /print/api/health
port: 3003
initialDelaySeconds: 10
periodSeconds: 30
Expand All @@ -62,20 +62,20 @@ spec:
- configMapRef:
name: {{ include "print.name" . }}-configmap
env:
- name: SENTRY_PRINT_DSN
- name: NUXT_SENTRY_DSN
valueFrom:
secretKeyRef:
name: {{ include "print.name" . }}
key: sentry-dsn
- name: BROWSER_WS_ENDPOINT
- name: NUXT_BROWSER_WS_ENDPOINT
valueFrom:
secretKeyRef:
name: {{ include "print.name" . }}
key: browser-ws-endpoint
- name: NUXT_PORT
- name: NITRO_PORT
value: "3003"
{{- if and .Values.ingress.enabled .Values.ingress.basicAuth.enabled }}
- name: BASIC_AUTH_TOKEN
- name: NUXT_BASIC_AUTH_TOKEN
valueFrom:
secretKeyRef:
name: {{ include "print.name" . }}
Expand Down
2 changes: 0 additions & 2 deletions .helm/ecamp3/templates/print_ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- include "ingress.basicAuth.annotations" . | nindent 4 }}
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/x-forwarded-prefix: {{ .Values.print.subpath }}
{{- if not (.Values.print.ingress.readTimeoutSeconds | empty) }}
nginx.ingress.kubernetes.io/proxy-read-timeout: {{ .Values.print.ingress.readTimeoutSeconds | quote }}
{{- end }}
Expand Down
7 changes: 2 additions & 5 deletions .helm/ecamp3/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ frontend:
requests:
cpu: 10m
memory: 10Mi
loginInfoTextKey: 'dev'
loginInfoTextKey: 'prod'

print:
subpath: "/print"
Expand Down Expand Up @@ -121,7 +121,7 @@ browserless:
repository: "docker.io/browserless/chrome"
pullPolicy: IfNotPresent
# renovate: datasource=docker depName=browserless/chrome
tag: "1.60.2-puppeteer-21.3.6"
tag: "1.61.0-puppeteer-21.4.1"
service:
type: ClusterIP
port: 3000
Expand Down Expand Up @@ -188,9 +188,6 @@ recaptcha:
siteKey:
secret:

coupon:
secret:

serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.8.1
20.9.0
Loading

0 comments on commit fccf59d

Please sign in to comment.