-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(garden): 🐛 fix garden configurations
for desktop app and bio-api Signed-off-by: Manuel Ruck <[email protected]>
- Loading branch information
Manuel Ruck
committed
Aug 18, 2024
1 parent
66aa79a
commit cf2293a
Showing
2 changed files
with
60 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,55 @@ | ||
kind: Build | ||
name: import-procedures | ||
description: Import procedures for the bundestag.io API | ||
name: bundestag-io-api | ||
type: container | ||
source: | ||
path: ../../../ | ||
path: ../../ | ||
include: | ||
- ./**/* | ||
- ./infra/Dockerfile | ||
spec: | ||
dockerfile: ./infra/Dockerfile | ||
targetStage: | ||
$if: ${this.mode == "sync"} | ||
$then: dev | ||
$else: runner | ||
buildArgs: | ||
NODE_VERSION: 18.18.2 | ||
SERVICE: crawler | ||
SERVICE_PATH: services/cron-jobs/crawler | ||
SERVICE: bundestag.io | ||
SERVICE_PATH: bundestag.io/api | ||
|
||
--- | ||
kind: Deploy | ||
name: import-procedures | ||
name: bundestag-io-api | ||
type: kubernetes | ||
description: Deploy the importer of procedures for the bundestag.io API | ||
dependencies: [build.import-procedures, deploy.mongo] | ||
|
||
disabled: ${!(environment.name == "prod" || environment.name == "local-prod")} | ||
|
||
varfiles: | ||
- .env | ||
- .env.local | ||
dependencies: | ||
- build.bundestag-io-api | ||
|
||
variables: | ||
DB_URL: mongodb://democracy-mongo:27017/bundestagio | ||
BIO_EDIT_TOKEN: 'TOP_SECRET_LOCAL_TOKEN' | ||
|
||
spec: | ||
files: | ||
- ./manifests/* | ||
files: [./manifests/*] # <--- Tell Garden what manifests to use | ||
|
||
defaultTarget: # <--- This tells Garden what "target" to use for logs, code syncing and more | ||
kind: Deployment | ||
name: bundestag-io-api | ||
|
||
sync: | ||
paths: | ||
- containerPath: /app/bundestag.io/api/src | ||
sourcePath: src | ||
mode: one-way | ||
overrides: | ||
- command: [pnpm, dev] | ||
|
||
patchResources: | ||
- name: import-procedures | ||
kind: CronJob | ||
- name: bundestag-io-api | ||
kind: Deployment | ||
patch: | ||
spec: | ||
jobTemplate: | ||
template: | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: import-procedures | ||
image: ${actions.build.import-procedures.outputs.deploymentImageId} # <--- Reference the output from the Build action | ||
|
||
- name: dip-api-token | ||
kind: Secret | ||
patch: | ||
data: | ||
DIP_API_KEY: ${base64Encode(var.DIP_API_KEY)} | ||
containers: | ||
- name: bundestag-io-api | ||
image: ${actions.build.bundestag-io-api.outputs.deploymentImageId} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,52 @@ | ||
kind: Build | ||
name: import-procedures | ||
description: Import procedures for the bundestag.io API | ||
name: democracy-desktop | ||
type: container | ||
source: | ||
path: ../../../ | ||
path: ../../ | ||
include: | ||
- ./**/* | ||
- ./infra/Dockerfile | ||
spec: | ||
dockerfile: ./infra/Dockerfile | ||
targetStage: | ||
$if: ${this.mode == "sync"} | ||
$then: dev | ||
$else: runner | ||
buildArgs: | ||
NODE_VERSION: 18.18.2 | ||
SERVICE: crawler | ||
SERVICE_PATH: services/cron-jobs/crawler | ||
SERVICE: democracy-app.de | ||
SERVICE_PATH: democracy/desktop | ||
|
||
--- | ||
kind: Deploy | ||
name: import-procedures | ||
name: democracy-desktop | ||
type: kubernetes | ||
description: Deploy the importer of procedures for the bundestag.io API | ||
dependencies: [build.import-procedures, deploy.mongo] | ||
|
||
disabled: ${!(environment.name == "prod" || environment.name == "local-prod")} | ||
dependencies: | ||
- build.democracy-desktop | ||
|
||
varfiles: | ||
- .env | ||
- .env.local | ||
spec: | ||
files: [./manifests/*] # <--- Tell Garden what manifests to use | ||
|
||
variables: | ||
DB_URL: mongodb://democracy-mongo:27017/bundestagio | ||
defaultTarget: # <--- This tells Garden what "target" to use for logs, code syncing and more | ||
kind: Deployment | ||
name: democracy-desktop | ||
|
||
spec: | ||
files: | ||
- ./manifests/* | ||
sync: | ||
paths: | ||
- containerPath: /app/democracy/desktop/src | ||
sourcePath: src | ||
mode: one-way | ||
overrides: | ||
- command: [pnpm, dev] | ||
|
||
patchResources: | ||
- name: import-procedures | ||
kind: CronJob | ||
- name: democracy-desktop | ||
kind: Deployment | ||
patch: | ||
spec: | ||
jobTemplate: | ||
template: | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: import-procedures | ||
image: ${actions.build.import-procedures.outputs.deploymentImageId} # <--- Reference the output from the Build action | ||
|
||
- name: dip-api-token | ||
kind: Secret | ||
patch: | ||
data: | ||
DIP_API_KEY: ${base64Encode(var.DIP_API_KEY)} | ||
containers: | ||
- name: democracy-desktop | ||
image: ${actions.build.democracy-desktop.outputs.deploymentImageId} |