From 037ecfcea9d8a38bad5d86ef2d1ef2a301419828 Mon Sep 17 00:00:00 2001 From: DecDuck Date: Sun, 3 Aug 2025 11:19:16 +1000 Subject: [PATCH] feat: add gitlab ci and sync next docs with 0.3.0 --- .gitlab-ci.yml | 23 +++++++++++++++++++++++ docs/advanced/building.md | 5 +---- docs/authentication/oidc.md | 17 +++++++++++------ docs/guides/exposing.md | 8 +++++++- docs/guides/quickstart.md | 5 +++-- docs/library.md | 19 ++++++++++++++++--- 6 files changed, 61 insertions(+), 16 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..5a9b8dc --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,23 @@ +image: node:18-alpine3.20 + +stages: + - test + - deploy + +test: + stage: test + script: + - yarn install + - yarn build + rules: + - if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH + +create-pages: + stage: deploy + script: + - yarn install + - yarn build + - mv ./build public + pages: true + rules: + - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH diff --git a/docs/advanced/building.md b/docs/advanced/building.md index c2c33fb..6339f3d 100644 --- a/docs/advanced/building.md +++ b/docs/advanced/building.md @@ -50,12 +50,10 @@ yarn link `drop` is the self hosted server. It's a Nuxt 3 project, but depends on the `droplet` package so isn't easily transportable. -Get started by cloning the `drop` source code, and then enter the directory and clone its submodules: +Get started by cloning the `drop` source code, and then enter the directory: ```shell git clone https://github.com/Drop-OSS/drop.git -cd drop -git submodule update --init --recursive ``` Then, link your build `droplet` package: @@ -89,7 +87,6 @@ To build drop-app, run: ```shell git clone https://github.com/Drop-OSS/drop-app.git cd drop-app -git submodule update --init --recursive git checkout main yarn yarn tauri build diff --git a/docs/authentication/oidc.md b/docs/authentication/oidc.md index 43bd3a2..f3f0551 100644 --- a/docs/authentication/oidc.md +++ b/docs/authentication/oidc.md @@ -6,12 +6,13 @@ OpenID Connect is a OAuth2 extension support by most identity providers. To configure OIDC, you must set the following environment variables: -| Variable | Usage | -| -------------------------------- | ------------------------------------------------------------------------------------------------- | -| `OIDC_CLIENT_ID` | Client ID from your identity provider. | -| `OIDC_CLIENT_SECRET` | Client secret from your identity provider. | -| `OIDC_ADMIN_GROUP` | Grant admin to users with this group configured in your identity provider. Tested with Authentik. | -| `DISABLE_SIMPLE_AUTH` (optional) | Disable simple auth | +| Variable | Usage | +| -------------------------------- | --------------------------------------------------------------------------------------------------- | +| `OIDC_CLIENT_ID` | Client ID from your identity provider. | +| `OIDC_CLIENT_SECRET` | Client secret from your identity provider. | +| `OIDC_ADMIN_GROUP` | Grant admin to users with this group configured in your identity provider. Tested with Authentik. | +| `DISABLE_SIMPLE_AUTH` (optional) | Disable simple auth | +| `OIDC_USERNAME_CLAIM` (optional) | Change the field that Drop pulls the username claim from. Users are merged based on their usernames | And then, you must configure **either**: @@ -27,3 +28,7 @@ And then, you must configure **either**: | `OIDC_TOKEN` | Token endpoint. Usually ends with `token`. | | `OIDC_USERINFO` | Userinfo endpoint. Usually ends with `userinfo`. | | `OIDC_SCOPES` | Comma separated list of scopes. Requires, at least, `openid` and `email`. | + + +## Redirect URL +Drop uses the `EXTERNAL_URL` environment variable to create the callback URL: `$EXTERNAL_URL/auth/callback/oidc`. diff --git a/docs/guides/exposing.md b/docs/guides/exposing.md index 692ce79..3b67385 100644 --- a/docs/guides/exposing.md +++ b/docs/guides/exposing.md @@ -1,6 +1,12 @@ # Exposing your instance Exposing your instance allows it to be accessible from other computers than the one you're hosting it on. +## Setting `EXTERNAL_URL` +Drop uses `EXTERNAL_URL` for creating invitation links, OIDC redirects, and everything else. It should be passed as an environment variable, and include the protocol, ip/domain, and port (if applicable). Examples include: +- `http://192.168.0.100:3000` +- `https://drop.my.domain/` +- `http://drop.home.arpa:3000` + ## LAN The `compose.yaml` provided in the [Quickstart guide](./quickstart.md) already exposes the Drop instance on port 3000. If you're on the same LAN as your Drop instance, you can find it's IP and then use: ``` @@ -17,4 +23,4 @@ There is no special configuration required to run Drop behind a reverse proxy. ## VPN If you are unsure how to setup a VPN for remote access, please find and follow a far better guide than this one. -Accessing Drop over a VPN works very similarly to [accessing via LAN](#lan), so follow those steps. \ No newline at end of file +Accessing Drop over a VPN works very similarly to [accessing via LAN](#lan), so follow those steps. diff --git a/docs/guides/quickstart.md b/docs/guides/quickstart.md index 681090c..950f091 100644 --- a/docs/guides/quickstart.md +++ b/docs/guides/quickstart.md @@ -25,7 +25,7 @@ services: - POSTGRES_USER=drop - POSTGRES_DB=drop drop: - image: ghcr.io/drop-oss/drop:nightly + image: ghcr.io/drop-oss/drop:latest depends_on: postgres: condition: service_healthy @@ -36,6 +36,7 @@ services: - ./data:/data environment: - DATABASE_URL=postgres://drop:drop@postgres:5432/drop + - EXTERNAL_URL=http://localhost:3000 # default, customise if accessing from another computer or behind a reverse proxy ``` **The main things in this `compose.yaml` is the volumes attached to the `drop` service:** @@ -61,7 +62,7 @@ Once your instance is running, it will log a URL that takes you to the setup wiz ## Setting up a client -To set up a client, your Drop instance will have to be accessible from it. See [Exposing your instance](./exposing.md) for information on how to do that. +To set up a client, your Drop instance will have to be accessible from it. See [Exposing your instance](/docs/guides/exposing.md) for information on how to do that. First, download the latest client for your platform from [the GitHub releases page](https://github.com/Drop-OSS/drop-app/releases). Then, install it for your platform. If we don't have a binary available for your platform, please create an issue on [the Drop app repository](https://github.com/Drop-OSS/drop-app) and we'll investigate it. diff --git a/docs/library.md b/docs/library.md index 351a59f..317974e 100644 --- a/docs/library.md +++ b/docs/library.md @@ -16,9 +16,22 @@ The Drop style library format enables all the Drop features, but isn't compatibl Drop uses a very particular structure to organise your games library. Generally, to get started, you need to create two folders for a game: -1. `{LIBRARY}/My Game Name` - The game folder. This contains **only** folders, as described as below. -2. `{LIBRARY}/My Game Name/my-version-name` - The version folder or file. This folder contains all the files for the game. Currently Drop supports this being a folder, or an archive in the format: - - `.zip` +``` +/ + MyGame/ # The game folder. This contains **only** folders, as described as below. + version-1/ # The version folder or file. This folder contains all the files for the game. Currently Drop supports this being a folder, or an archive + game.exe + ... + version-2/ + ... + + MyOtherGame/ + version1.zip + version2/ + ... + + ..etc... +``` Once in the UI, you'll be prompted to "import" each folder separately: