diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..781c718 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,64 @@ +name: Release Workflow + +on: + release: + types: [published] + # This can be used to automatically publish nightlies at UTC nighttime + schedule: + - cron: '0 2 * * *' # run at 2 AM UTC + +jobs: + web: + name: Push website Docker image to registry + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - name: Check out the repo + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + with: + buildkitd-flags: --debug + + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: | + ghcr.io/drop-OSS/drop + tags: | + type=schedule,pattern=nightly + type=semver,pattern=v{{version}} + type=semver,pattern=v{{major}}.{{minor}} + type=semver,pattern=v{{major}} + type=ref,event=branch + type=ref,event=pr + type=sha + # set latest tag for stable releases + type=raw,value=latest,enable=${{ github.event.release.prerelease == false }} + + - name: Build and push image + id: build-and-push + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + platforms: linux/amd64,linux/arm64 + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/.vscode/settings.json b/.vscode/settings.json index 87ca8ef..e426a5e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,18 +1,21 @@ { - "spellchecker.ignoreWordsList": [ - "mTLS", - "Wireguard" - ], - "sqltools.connections": [ - { - "previewLimit": 50, - "server": "localhost", - "port": 5432, - "driver": "PostgreSQL", - "name": "drop", - "database": "drop", - "username": "drop", - "password": "drop" - } - ] + "spellchecker.ignoreWordsList": ["mTLS", "Wireguard"], + "sqltools.connections": [ + { + "previewLimit": 50, + "server": "localhost", + "port": 5432, + "driver": "PostgreSQL", + "name": "drop", + "database": "drop", + "username": "drop", + "password": "drop" + } + ], + // allow autocomplete for ArkType expressions like "string | num" + "editor.quickSuggestions": { + "strings": "on" + }, + // prioritize ArkType's "type" for autoimports + "typescript.preferences.autoImportSpecifierExcludeRegexes": ["^(node:)?os$"] } diff --git a/Dockerfile b/Dockerfile index 33e714a..23fe11c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # pull pre-configured and updated build environment -FROM registry.deepcore.dev/drop-oss/drop-server-build-environment/main:latest AS build-system +FROM debian:12.10-slim AS build-system # setup workdir RUN mkdir /build diff --git a/README.md b/README.md index d23a0e2..55bedac 100644 --- a/README.md +++ b/README.md @@ -32,16 +32,18 @@ To just deploy Drop, we've set up a simple docker compose file in deploy-templat 3. Edit the compose.yml file (`nano compose.yml`) and copy your GiamtBomb API Key into the GIANT_BOMB_API_KEY environment variable 4. Run `docker compose up -d` -Your drop server should now be running. To register the admin user, navigate to http://your.drop.server.ip:3000/register?id=admin +Your drop server should now be running. To register the admin user, navigate to http://your.drop.server.ip:3000/register?id=admin and fill in the required forms ### Adding a game + To add a game to the drop library, do as follows: + 1. Ensure that the current user owns the library folder with `sudo chown -R $(id -u $(whoami)) library` 2. `cd library` 3. `mkdir ` with the name of the game which you would like to register 4. `cd ` -5. `mkdir ` Upload files for the specific game version to this folder +5. `mkdir ` Upload files for the specific game version to this folder 6. Navigate to http://your.drop.server.ip:3000/ 7. Import game metadata (uses GiantBomb API Key) by selecting the game and specifying which entry to import 8. Navigate to http://your.drop.server.ip:3000/admin/library @@ -73,7 +75,7 @@ Steps: As part of the first-time bootstrap, Drop creates an invitation with the fixed id of 'admin'. So, to create an admin account, go to: -http://localhost:3000/register?id=admin +http://localhost:3000/auth/register?id=admin ## Contributing diff --git a/components/UserHeader/UserWidget.vue b/components/UserHeader/UserWidget.vue index 9294218..3e8d29b 100644 --- a/components/UserHeader/UserWidget.vue +++ b/components/UserHeader/UserWidget.vue @@ -39,7 +39,11 @@
- + + {{ nav.label }} +
@@ -81,7 +85,7 @@ const navigation: NavigationItem[] = [ }, { label: "Sign out", - route: "/signout", + route: "/auth/signout", prefix: "", }, ].filter((e) => e !== undefined); diff --git a/error.vue b/error.vue index 24ecfda..d75c957 100644 --- a/error.vue +++ b/error.vue @@ -16,7 +16,7 @@ const showSignIn = statusCode ? statusCode == 403 || statusCode == 401 : false; async function signIn() { clearError({ - redirect: `/signin?redirect=${encodeURIComponent(route.fullPath)}`, + redirect: `/auth/signin?redirect=${encodeURIComponent(route.fullPath)}`, }); } diff --git a/layouts/default.vue b/layouts/default.vue index e419ffb..8e5bf69 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -1,10 +1,10 @@