fix(workshop): resolve remaining review feedback
This commit is contained in:
1 parent
b0429f9287
commit
f1e4866a8b
10 files changed
+67
-32
No files matched your search
@@ -1 +1,3 @@
|
||||
pb_data/
|
||||
.env
|
||||
.env.local
|
||||
@@ -22,14 +22,13 @@ docker compose up
|
||||
- Homepage URL: `https://store.homarr.dev` (or `http://localhost:8090` in dev)
|
||||
- Authorization callback URL: `https://store.homarr.dev/api/oauth2-redirect`
|
||||
(dev: `http://localhost:8090/api/oauth2-redirect`)
|
||||
2. Provide the credentials before the first run so the init migration wires them up:
|
||||
2. Provide the GitHub credentials and initial admin credentials before the first run so the init migration wires them up and the PocketBase dashboard can be accessed:
|
||||
|
||||
```bash
|
||||
GITHUB_CLIENT_ID=xxx GITHUB_CLIENT_SECRET=yyy docker compose up
|
||||
GITHUB_CLIENT_ID=xxx GITHUB_CLIENT_SECRET=yyy PB_ADMIN_EMAIL=admin@example.com PB_ADMIN_PASSWORD=change-me docker compose up
|
||||
```
|
||||
|
||||
If you start without them, GitHub OAuth is left disabled — enable it later from the admin
|
||||
UI under **Collections -> users -> Options -> OAuth2**.
|
||||
If you start without the GitHub credentials, GitHub OAuth is left disabled — enable it later from the admin UI under **Collections -> users -> Options -> OAuth2**. `PB_ADMIN_EMAIL` and `PB_ADMIN_PASSWORD` are used by the PocketBase image to bootstrap the first superuser for the admin UI.
|
||||
|
||||
## Collections
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
pocketbase:
|
||||
image: ghcr.io/muchobien/pocketbase:latest
|
||||
image: ghcr.io/muchobien/pocketbase:0.26.2
|
||||
container_name: homarr-store
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
|
||||
@@ -6,8 +6,8 @@ migrate(
|
||||
|
||||
const githubClientId = $os.getenv("GITHUB_CLIENT_ID");
|
||||
const githubClientSecret = $os.getenv("GITHUB_CLIENT_SECRET");
|
||||
users.oauth2.enabled = true;
|
||||
if (githubClientId && githubClientSecret) {
|
||||
users.oauth2.enabled = true;
|
||||
users.oauth2.providers = [
|
||||
{
|
||||
name: "github",
|
||||
@@ -123,6 +123,7 @@ migrate(
|
||||
{ name: "updated", type: "autodate", onCreate: true, onUpdate: true },
|
||||
],
|
||||
});
|
||||
comments.addIndex("idx_comments_submission", false, "submission", "");
|
||||
app.save(comments);
|
||||
},
|
||||
(app) => {
|
||||
|
||||
Reference in new issue
Block a user