From 2e5f3c115e67b688ef3320bda299d2ccfe5cfc3c Mon Sep 17 00:00:00 2001 From: Raffi02k Date: Fri, 24 Jul 2026 13:49:14 +0200 Subject: [PATCH 1/6] feat: Created a simple github action workflow. --- .github/workflows/ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..38d172b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,12 @@ +name: CI + +on: + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 \ No newline at end of file From 2ad7827203362c90ca0f13d57544f19fb6fa4908 Mon Sep 17 00:00:00 2001 From: Raffi02k Date: Fri, 24 Jul 2026 14:02:49 +0200 Subject: [PATCH 2/6] feat: Added installing python for the workflow --- .github/workflows/ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 38d172b..a197c64 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI +name: Continuous Integration on: push: @@ -7,6 +7,12 @@ on: jobs: build: runs-on: ubuntu-latest + steps: - name: Checkout repository - uses: actions/checkout@v4 \ No newline at end of file + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.13" \ No newline at end of file From f98cd32f597e06a3679711e178f16b74e6449a8f Mon Sep 17 00:00:00 2001 From: Raffi02k Date: Fri, 24 Jul 2026 14:12:04 +0200 Subject: [PATCH 3/6] feat: Add backend dependency check to CI --- .github/workflows/ci.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a197c64..fd1a083 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,4 +15,12 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.13" \ No newline at end of file + python-version: "3.13" + + - name: Install backend dependencies + working-directory: backend + run: pip install -r requirements.txt + + - name: Verify backend import + working-directory: backend + run: python -c "from app import main" \ No newline at end of file From a6669c1318267b1815b59bd9f99edb3b33de5509 Mon Sep 17 00:00:00 2001 From: Raffi02k Date: Fri, 24 Jul 2026 14:17:39 +0200 Subject: [PATCH 4/6] feat: Fixed with the secret problem on Verify backend import --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd1a083..f359489 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,4 +23,8 @@ jobs: - name: Verify backend import working-directory: backend - run: python -c "from app import main" \ No newline at end of file + env: + SECRET_KEY: test-secret-key + ALGORITHM: HS256 + ACCESS_TOKEN_EXPIRE_MINUTES: 30 + run: python -c "from app import main" \ No newline at end of file From c5ecba96c170d46e16e99cb51c5a6c27be3ba1ca Mon Sep 17 00:00:00 2001 From: Raffi02k Date: Fri, 24 Jul 2026 14:21:04 +0200 Subject: [PATCH 5/6] feat: Added frontend workflow --- .github/workflows/ci.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f359489..f68da3e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,4 +27,17 @@ jobs: SECRET_KEY: test-secret-key ALGORITHM: HS256 ACCESS_TOKEN_EXPIRE_MINUTES: 30 - run: python -c "from app import main" \ No newline at end of file + run: python -c "from app import main" + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: "22" + + - name: Install frontend dependencies + working-directory: frontend + run: npm ci + + - name: Build frontend + working-directory: frontend + run: npm run build \ No newline at end of file From 5c1b24cdf7e55cb54812de83f346b03160bdf173 Mon Sep 17 00:00:00 2001 From: Raffi02k Date: Fri, 24 Jul 2026 14:25:51 +0200 Subject: [PATCH 6/6] docs: add docker compose usage to README --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/README.md b/README.md index cb2fbf6..900542f 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,43 @@ Frontend körs normalt på `http://localhost:5173`. Frontend använder `/api` som standard. I lokal utveckling proxas det automatiskt till `http://localhost:8000` via `frontend/vite.config.ts`. +## Docker Compose + +När Docker-stödet är på plats kan projektet startas med Docker Compose istället för att köra backend och frontend var för sig. + +### Starta projektet + +```bash +docker compose up --build +``` + +Detta bygger images vid behov och startar alla services som behövs för lokal utveckling. + +### Portar + +- Frontend: `http://localhost:5173` +- Backend: `http://localhost:8000` + +### Stoppa containrarna + +```bash +docker compose down +``` + +### Vanliga Docker-kommandon + +```bash +docker compose up --build +docker compose down +docker compose logs +docker compose logs -f +docker compose build +``` + +Tips: +- Använd `docker compose logs -f` för att följa loggar i realtid. +- Kör `docker compose build` om du har ändrat en Dockerfile eller beroenden. + ## Miljövariabler ### Backend