diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 862af233..6dd92b2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,9 +40,6 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile - - name: Install dependencies - run: pnpm install --frozen-lockfile - - name: Format run: pnpm format:check diff --git a/.github/workflows/ci.yml.bak b/.github/workflows/ci.yml.bak deleted file mode 100644 index 69a97a45..00000000 --- a/.github/workflows/ci.yml.bak +++ /dev/null @@ -1,50 +0,0 @@ -name: CI - -on: - pull_request: - branches: [main, dev] - push: - branches: [main, dev] - -jobs: - lint-and-test: - runs-on: self-hosted - strategy: - fail-fast: false - matrix: - workspace: [frontend, backend] - defaults: - run: - working-directory: ${{ matrix.workspace }} - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 - with: - node-version: 24.21.0 - - - uses: pnpm/action-setup@v4 - with: - version: 11.25.0 - - - name: Get pnpm store path - id: pnpm-store - run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT" - - - uses: actions/cache@v4 - with: - path: ${{ steps.pnpm-store.outputs.path }} - key: pnpm-${{ runner.os }}-${{ matrix.workspace }}-${{ hashFiles(format('{0}/pnpm-lock.yaml', matrix.workspace)) }} - restore-keys: pnpm-${{ runner.os }}-${{ matrix.workspace }}- - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Lint - run: pnpm run lint - - - name: Typecheck - run: pnpm run --if-present typecheck - - - name: Test - run: pnpm run --if-present test --run diff --git a/backend/.env.example b/backend/.env.example index 04db58d1..732415fe 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -7,5 +7,5 @@ TUNNEL_PORT=5433 DATABASE_URL=postgresql://webapp:@localhost:5433/gamesdb PORT=3001 -JWT_SECRET=aaaa +JWT_SECRET= diff --git a/db/database-connect.md b/db/database-connect.md index 627b09dc..38da7f7c 100644 --- a/db/database-connect.md +++ b/db/database-connect.md @@ -17,7 +17,7 @@ TUNNEL_PORT=5433 # backend server env vars DATABASE_URL=postgresql://webapp:@localhost:5433/gamesdb PORT=3001 -JWT_TOKEN= +JWT_SECRET= ``` ## 2. Database-tilkobling under utvikling diff --git a/db/database-usage.md b/db/database-usage.md index 7795a683..7d82efd2 100644 --- a/db/database-usage.md +++ b/db/database-usage.md @@ -62,12 +62,12 @@ SELECT metacritic FROM games WHERE id = 4291; ## Import og rettigheter -Filer i `backend/db/`: `schema.sql`, `indexes.sql`, `grants.sql`, `load.py`, `requirements.txt`. +Filer i `db/`: `schema.sql`, `indexes.sql`, `grants.sql`, `load.py`, `requirements.txt`. _Full reimport på VM-en (sletter også reviews)_: ``` -cd backend/db && source .venv/bin/activate +cd db && source ~/venv/bin/activate export DATABASE_URL='postgresql://gameapp:PASSORD@localhost:5432/gamesdb' python load.py --force psql "$DATABASE_URL" -f grants.sql diff --git a/scripts/test-select.sh b/scripts/test-select.sh index c3226c45..bb655370 100755 --- a/scripts/test-select.sh +++ b/scripts/test-select.sh @@ -1,2 +1,2 @@ #!/bin/bash -psql -h localhost -p 5433 -U gameapp -d gamesdb -c "SELECT count(*) FROM games;" +psql -h localhost -p 5433 -U webapp -d gamesdb -c "SELECT count(*) FROM games;"