Skip to content

Commit 987b1cd

Browse files
committed
fix(docker): use correct compress middleware for admin dashboard
- Change gzip@file to compress@file (gzip@file doesn't exist) - Add OAuth redirect URLs documentation for main app and admin - Add admin_users table setup instructions
1 parent 9c25d6f commit 987b1cd

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,34 @@ SELECT * FROM internal.get_push_config();
196196

197197
**Note:** Supabase Cloud doesn't allow `ALTER DATABASE SET` for custom parameters, so we use Vault for secure secret storage.
198198

199+
**Step 5: Configure OAuth Redirect URLs** 🔐
200+
201+
Go to **Authentication → URL Configuration** in Supabase Dashboard and add your **Redirect URLs**:
202+
203+
```
204+
https://yourdomain.com
205+
https://yourdomain.com/*
206+
https://admin.yourdomain.com
207+
https://admin.yourdomain.com/*
208+
```
209+
210+
Replace `yourdomain.com` with your actual domain.
211+
212+
**Step 6: Add Admin Users** 👤
213+
214+
Only users in the `admin_users` table can access the admin dashboard. Run this SQL to grant access:
215+
216+
```sql
217+
-- Add admin user by email
218+
INSERT INTO public.admin_users (user_id, created_at)
219+
SELECT id, now() FROM auth.users WHERE email = 'your-admin@example.com';
220+
221+
-- Verify admin users
222+
SELECT u.email, a.created_at
223+
FROM public.admin_users a
224+
JOIN auth.users u ON a.user_id = u.id;
225+
```
226+
199227
**Note:** Make sure your Supabase project allows connections from your Docker network or configure network settings accordingly.
200228

201229
</details>

docker-compose.prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ services:
519519
- 'traefik.http.routers.admin.entrypoints=websecure'
520520
- 'traefik.http.routers.admin.tls.certresolver=letsencrypt'
521521
- 'traefik.http.routers.admin.service=admin'
522-
- 'traefik.http.routers.admin.middlewares=security-headers@file,gzip@file'
522+
- 'traefik.http.routers.admin.middlewares=security-headers@file,compress@file'
523523
- 'traefik.http.services.admin.loadbalancer.server.port=3100'
524524
# Health check
525525
- 'traefik.http.services.admin.loadbalancer.healthcheck.path=/api/health'

0 commit comments

Comments
 (0)