Skip to content

Commit

Permalink
fix: 🐛 add config for PROCEDURES_SERVER_URL
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Ruck <[email protected]>
  • Loading branch information
Manuel Ruck authored and ManAnRuck committed Sep 22, 2024
1 parent 7038e1b commit 4ad710e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion bundestag.io/admin/.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ AI_SERVER_URL_CODEGEN=http://localhost:4003
AI_ACCESS_TOKEN=EMPTY
AI_SIMULATION=true
NON_NAMED_VOTES_AI_SERVER_URL=http://localhost:3005
NON_NAMED_VOTES_AI_SECRET=CHANGE_ME
NON_NAMED_VOTES_AI_SECRET=CHANGE_ME
PROCEDURES_SERVER_URL=http://localhost:3006
3 changes: 2 additions & 1 deletion bundestag.io/admin/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ AI_SERVER_URL_CODEGEN=http://localhost:4003
AI_ACCESS_TOKEN=EMPTY
AI_SIMULATION=true
NON_NAMED_VOTES_AI_SERVER_URL=http://localhost:3005
NON_NAMED_VOTES_AI_SECRET=CHANGE_ME
NON_NAMED_VOTES_AI_SECRET=CHANGE_ME
PROCEDURES_SERVER_URL=http://localhost:3006
2 changes: 2 additions & 0 deletions bundestag.io/admin/manifests/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ spec:
value: 'http://non-named-votes-ai'
- name: NON_NAMED_VOTES_AI_SECRET
value: ${var.NON_NAMED_VOTES_AI_SECRET}
- name: PROCEDURES_SERVER_URL
value: 'http://procedures'
ports:
- containerPort: 4003
name: http
Expand Down
2 changes: 1 addition & 1 deletion bundestag.io/admin/src/app/list/past/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default async function Page() {
}

async function getData(): Promise<IProcedure[]> {
const res = await fetch('http://procedures/procedures/list/past', {
const res = await fetch(`${process.env.PROCEDURES_SERVER_URL}/procedures/list/past`, {
headers: {
'Cache-Control': 'no-cache',
cache: 'no-store',
Expand Down
2 changes: 1 addition & 1 deletion bundestag.io/admin/src/app/list/upcoming/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default async function Page() {
}

async function getData(): Promise<IProcedure[]> {
const res = await fetch('http://procedures/procedures/list/upcoming', {
const res = await fetch(`${process.env.PROCEDURES_SERVER_URL}/procedures/list/upcoming`, {
headers: {
'Cache-Control': 'no-cache',
cache: 'no-store',
Expand Down

0 comments on commit 4ad710e

Please sign in to comment.