Skip to content

Commit

Permalink
Add prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
berrydenhartog committed Jan 17, 2025
1 parent 3883d84 commit febdb65
Show file tree
Hide file tree
Showing 20 changed files with 336 additions and 237 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @MinBZK/mijn-bureau
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
day: "monday"
time: "08:00"
timezone: "Europe/Amsterdam"
groups:
allgithubactions:
patterns:
- "*"
3 changes: 3 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Description

Describe in detail the changes you are proposing, and the rationale.
11 changes: 11 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
changelog:
exclude:
authors:
- dependabot[bot]
categories:
- title: Exciting New Features 🎉
labels:
- enhancement
- title: Other Changes
labels:
- "*"
61 changes: 61 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]

name: ci

jobs:
sonarqube:
name: SonarQube
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v4
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install Prettier
run: npm install --global prettier

- name: Format YAML files
run: prettier --write "**/*.yaml"

- name: Commit changes
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
git add .
git commit -m 'Format YAML files'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

checkov:
name: checkov
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Checkov GitHub Action
uses: bridgecrewio/checkov-action@v12
with:
directory: .
quiet: true
framework: kustomize
soft_fail: true
Empty file added .prettierrc.yaml
Empty file.
2 changes: 1 addition & 1 deletion .sops.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
creation_rules:
- path_regex: manifests/.*\.yaml$
encrypted_regex: ^(data|stringData)$
age: "age1xqm6rlmcsyfna0chsmf8gw64n86405rgr04ek5drad04ca00fewqp02n5c"
age: "age1xqm6rlmcsyfna0chsmf8gw64n86405rgr04ek5drad04ca00fewqp02n5c"
11 changes: 11 additions & 0 deletions check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash


# run prettier
if ! command -v prettier &> /dev/null
then
echo "Prettier could not be found, please prettier it first."
exit 1
fi

prettier --write "**/*.yaml"
2 changes: 1 addition & 1 deletion kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ resources:
- manifests/monitoring.yaml
- manifests/secret-ai.yaml
- manifests/deployment-mailcatcher.yaml
- manifests/service-mailcatcher.yaml
- manifests/service-mailcatcher.yaml
66 changes: 33 additions & 33 deletions manifests/deployment-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ spec:
spec:
automountServiceAccountToken: false
containers:
- name: docs
image: lasuite/impress-backend:v1.10.0
securityContext:
runAsUser: 0
command:
- gunicorn
- -c
- /usr/local/etc/gunicorn/impress.py
- impress.wsgi:application
- --reload
env:
- name: docs
image: lasuite/impress-backend:v1.10.0
securityContext:
runAsUser: 0
command:
- gunicorn
- -c
- /usr/local/etc/gunicorn/impress.py
- impress.wsgi:application
- --reload
env:
- name: "AWS_S3_ACCESS_KEY_ID"
valueFrom:
secretKeyRef:
Expand Down Expand Up @@ -173,30 +173,30 @@ spec:
valueFrom:
secretKeyRef:
name: sec-ai
key: api_key
key: api_key
- name: USER_OIDC_FIELDS_TO_FULLNAME
value: "name"
value: "name"
- name: DJANGO_DEBUG
value: "True"
- name: DJANGO_USE_SWAGGER
value: "True"
ports:
- name: http
containerPort: 8000
protocol: TCP
livenessProbe:
httpGet:
path: /__heartbeat__
port: 8000
initialDelaySeconds: 10
timeoutSeconds: 1
readinessProbe:
httpGet:
path: /__lbheartbeat__
port: 8000
initialDelaySeconds: 10
resources:
requests:
cpu: 300m
memory: 4Gi
ephemeral-storage: "2Gi"
ports:
- name: http
containerPort: 8000
protocol: TCP
livenessProbe:
httpGet:
path: /__heartbeat__
port: 8000
initialDelaySeconds: 10
timeoutSeconds: 1
readinessProbe:
httpGet:
path: /__lbheartbeat__
port: 8000
initialDelaySeconds: 10
resources:
requests:
cpu: 300m
memory: 4Gi
ephemeral-storage: "2Gi"
33 changes: 16 additions & 17 deletions manifests/deployment-frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,19 @@ spec:
spec:
automountServiceAccountToken: false
containers:
- name: docs
image: lasuite/impress-frontend:v1.10.0
env:
- name: "NEXT_PUBLIC_API_ORIGIN"
value: "https://docs.la-suite.apps.digilab.network"
- name: "PORT"
value: "8080"
ports:
- name: http
containerPort: 8080
protocol: TCP
resources:
requests:
cpu: 100m
memory: 1Gi
ephemeral-storage: "2Gi"

- name: docs
image: lasuite/impress-frontend:v1.10.0
env:
- name: "NEXT_PUBLIC_API_ORIGIN"
value: "https://docs.la-suite.apps.digilab.network"
- name: "PORT"
value: "8080"
ports:
- name: http
containerPort: 8080
protocol: TCP
resources:
requests:
cpu: 100m
memory: 1Gi
ephemeral-storage: "2Gi"
54 changes: 27 additions & 27 deletions manifests/deployment-minio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,31 @@ spec:
spec:
automountServiceAccountToken: false
containers:
- name: minio
image: minio/minio:RELEASE.2024-11-07T00-52-20Z
command: ["minio", "server", "/data", "--console-address", ":9001"]
ports:
- containerPort: 9000
- containerPort: 9001
env:
- name: MINIO_PROMETHEUS_AUTH_TYPE
value: "public"
- name: MINIO_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: sec-minio
key: minio_root_password
- name: MINIO_ROOT_USER
valueFrom:
secretKeyRef:
name: sec-minio
key: minio_root_user
- name: MINIO_BROWSER_LOGIN_ANIMATION
value: "off"
volumeMounts:
- name: minio-pv-storage
mountPath: /data
- name: minio
image: minio/minio:RELEASE.2024-11-07T00-52-20Z
command: ["minio", "server", "/data", "--console-address", ":9001"]
ports:
- containerPort: 9000
- containerPort: 9001
env:
- name: MINIO_PROMETHEUS_AUTH_TYPE
value: "public"
- name: MINIO_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: sec-minio
key: minio_root_password
- name: MINIO_ROOT_USER
valueFrom:
secretKeyRef:
name: sec-minio
key: minio_root_user
- name: MINIO_BROWSER_LOGIN_ANIMATION
value: "off"
volumeMounts:
- name: minio-pv-storage
mountPath: /data
volumes:
- name: minio-pv-storage
persistentVolumeClaim:
claimName: pvc-minio
- name: minio-pv-storage
persistentVolumeClaim:
claimName: pvc-minio
28 changes: 14 additions & 14 deletions manifests/deployment-redis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ spec:
spec:
automountServiceAccountToken: false
containers:
- name: redis
image: redis:7.4.1
ports:
- containerPort: 6379
resources:
requests:
cpu: 300m
memory: 1Gi
ephemeral-storage: "2Gi"
volumeMounts:
- name: redis-data
mountPath: /data
- name: redis
image: redis:7.4.1
ports:
- containerPort: 6379
resources:
requests:
cpu: 300m
memory: 1Gi
ephemeral-storage: "2Gi"
volumeMounts:
- name: redis-data
mountPath: /data
volumes:
- name: redis-data
emptyDir: {}
- name: redis-data
emptyDir: {}
52 changes: 26 additions & 26 deletions manifests/deployment-yprovider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,32 @@ spec:
spec:
automountServiceAccountToken: false
containers:
- name: docs
image: lasuite/impress-y-provider:v1.10.0
env:
- name: "COLLABORATION_LOGGING"
value: "true"
- name: "COLLABORATION_SERVER_ORIGIN"
value: "https://docs.la-suite.apps.digilab.network"
- name: "COLLABORATION_SERVER_SECRET"
valueFrom:
- name: docs
image: lasuite/impress-y-provider:v1.10.0
env:
- name: "COLLABORATION_LOGGING"
value: "true"
- name: "COLLABORATION_SERVER_ORIGIN"
value: "https://docs.la-suite.apps.digilab.network"
- name: "COLLABORATION_SERVER_SECRET"
valueFrom:
secretKeyRef:
name: sec-docs
key: server_secret
- name: "Y_PROVIDER_API_KEY"
value: "my-secret"
ports:
- name: http
containerPort: 4444
protocol: TCP
livenessProbe:
httpGet:
path: /ping
port: 4444
initialDelaySeconds: 10
timeoutSeconds: 1
resources:
requests:
cpu: 500m
memory: 4Gi
ephemeral-storage: "2Gi"
- name: "Y_PROVIDER_API_KEY"
value: "my-secret"
ports:
- name: http
containerPort: 4444
protocol: TCP
livenessProbe:
httpGet:
path: /ping
port: 4444
initialDelaySeconds: 10
timeoutSeconds: 1
resources:
requests:
cpu: 500m
memory: 4Gi
ephemeral-storage: "2Gi"
Loading

0 comments on commit febdb65

Please sign in to comment.