diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..e7c3d29 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,12 @@ +.env +Dockerfile +.dockerignore +node_modules +npm-debug.log +README.md +.next +.git +/data/* +.huksy +.github +.vscode \ No newline at end of file diff --git a/.env.local.example b/.env.local.example index e28a786..7498ed9 100644 --- a/.env.local.example +++ b/.env.local.example @@ -1,3 +1,8 @@ DEEPL_API_KEY="" MOODLE_USERNAME="" -MOODLE_PASSWORD="" \ No newline at end of file +MOODLE_PASSWORD="" +DB_HOST=localhost +DB_PORT=5432 +POSTGRES_DB=app +POSTGRES_USER=postgres +POSTGRES_PASSWORD="" \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index bf64e90..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "env": { - "browser": true, - "es2021": true - }, - "extends": ["eslint:recommended", "standard-with-typescript", "prettier"], - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module", - "project": "**/tsconfig.json", - "tsconfigRootDir": "./", - "noUnusedLocals": true, - "noUnusedParameters": true - }, - "rules": {}, - "ignorePatterns": ["node_modules", "documentation"] -} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 38d81b5..7603216 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,20 +1,20 @@ name: CI on: push: - branches: ['main', 'develop'] + branches: [develop, main] pull_request: + branches: [develop, main] jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Use Node.js - uses: actions/setup-node@v4 + - uses: oven-sh/setup-bun@v2 with: - node-version: 20 + bun-version: latest + - uses: actions/checkout@v4 - name: Install modules - run: npm install + run: bun install - name: Run ESLint - run: npx eslint . --ext .js,.jsx,.ts,.tsx + run: bunx eslint . - name: Run Prettier run: npx prettier --check . diff --git a/.gitignore b/.gitignore index f20e809..458e05e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ node_modules .DS_Store src/data/announcements.json src/data/cl-events.json +database/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 9310875..8929f9d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # use the official Bun image # see all versions at https://hub.docker.com/r/oven/bun/tags -FROM oven/bun:1 as base +FROM oven/bun:1 AS base WORKDIR /usr/src/app # install dependencies into temp directory diff --git a/bun.lockb b/bun.lockb index de3c08c..839a7a4 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/docker-compose.yml b/docker-compose.yml index 26238bb..a6895b0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: '3.8' - services: app: build: diff --git a/documentation/config.yml b/documentation/config.yml index 8492602..514efd0 100644 --- a/documentation/config.yml +++ b/documentation/config.yml @@ -1,7 +1,5 @@ introspection: - schemaFile: - - ./src/schema.gql - + url: http://localhost:4321/graphql servers: - url: https://api.neuland.app/graphql description: Neuland API Server @@ -19,6 +17,8 @@ info: license: name: AGPL-3.0 url: 'https://www.gnu.org/licenses/agpl-3.0.html' +extensions: + scalarGraphql: true spectaql: faviconFile: ./documentation/icon.svg theme: spectaql diff --git a/documentation/generated/index.html b/documentation/generated/index.html index 4dd6477..7e6c459 100644 --- a/documentation/generated/index.html +++ b/documentation/generated/index.html @@ -36,15 +36,27 @@
announcements