mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 15:12:08 +01:00
Compare commits
5 Commits
merge/upda
...
573404dead
| Author | SHA1 | Date | |
|---|---|---|---|
| 573404dead | |||
| d57dd82a64 | |||
| 50f37c1161 | |||
| ae22d2ee5f | |||
| 509608f8c9 |
2
.github/workflows/deploy-prod.yaml
vendored
2
.github/workflows/deploy-prod.yaml
vendored
@@ -27,6 +27,7 @@ jobs:
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build and push image (reusable)
|
name: Build and push image (reusable)
|
||||||
|
needs: [test]
|
||||||
uses: ./.github/workflows/build-image.yaml
|
uses: ./.github/workflows/build-image.yaml
|
||||||
with:
|
with:
|
||||||
mode: prod
|
mode: prod
|
||||||
@@ -36,6 +37,7 @@ jobs:
|
|||||||
|
|
||||||
get_urls:
|
get_urls:
|
||||||
name: Generate Production URLs
|
name: Generate Production URLs
|
||||||
|
needs: [test]
|
||||||
uses: ./.github/workflows/url_generator.yml
|
uses: ./.github/workflows/url_generator.yml
|
||||||
with:
|
with:
|
||||||
mode: prod
|
mode: prod
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM python:3.11-slim
|
FROM python:3.11-trixie
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
from os.path import dirname, join
|
from os.path import dirname, join
|
||||||
from time import strptime
|
from time import strptime
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
@@ -55,7 +56,7 @@ def _load_mock_bank_transactions(user_id: UUID) -> None:
|
|||||||
|
|
||||||
transactions = []
|
transactions = []
|
||||||
with httpx.Client() as client:
|
with httpx.Client() as client:
|
||||||
response = client.get("http://127.0.0.1:8000/mock-bank/scrape")
|
response = client.get(f"{os.getenv('APP_POD_URL')}/mock-bank/scrape")
|
||||||
if response.status_code != httpx.codes.OK:
|
if response.status_code != httpx.codes.OK:
|
||||||
return
|
return
|
||||||
for transaction in response.json():
|
for transaction in response.json():
|
||||||
|
|||||||
@@ -120,3 +120,5 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: prod
|
name: prod
|
||||||
key: SMTP_FROM
|
key: SMTP_FROM
|
||||||
|
- name: APP_POD_URL
|
||||||
|
value: {{ printf "http://%s.%s.svc.cluster.local" .Values.app.name .Release.Namespace | quote }}
|
||||||
|
|||||||
Reference in New Issue
Block a user