Fix: Resolve blank page issue

This commit is contained in:
gpt-engineer-app[bot]
2025-10-20 22:26:53 +00:00
parent 1c5b1e99b6
commit 0bef8d1f08
4 changed files with 27 additions and 3 deletions

View File

@@ -1,12 +1,22 @@
# Docker WebUI Configuration # Docker WebUI Configuration
# Copy this file to .env and customize your settings # Copy this file to .env and customize your settings
# ===============================================
# FRONTEND BUILD VARIABLES (REQUIRED)
# These are used at build time by Vite. Fill them before building.
# Get the values from your backend settings.
VITE_SUPABASE_URL=
VITE_SUPABASE_PUBLISHABLE_KEY=
VITE_SUPABASE_PROJECT_ID=
# Optional: Port to expose the web UI
PORT=8080
# =============================================== # ===============================================
# ADMIN CREDENTIALS # ADMIN CREDENTIALS
# =============================================== # ===============================================
# IMPORTANT: Change these before first run! # IMPORTANT: Change these before first run!
# These credentials are used to create the admin account # These credentials are used to create the admin account
ADMIN_EMAIL=admin@docker-webui.local ADMIN_EMAIL=admin@docker-webui.local
ADMIN_PASSWORD=changeme123 ADMIN_PASSWORD=changeme123
@@ -15,5 +25,4 @@ ADMIN_PASSWORD=changeme123
# =============================================== # ===============================================
# Set your server timezone # Set your server timezone
# Examples: Europe/Copenhagen, America/New_York, Asia/Tokyo # Examples: Europe/Copenhagen, America/New_York, Asia/Tokyo
TZ=Europe/Copenhagen TZ=Europe/Copenhagen

View File

@@ -12,6 +12,14 @@ RUN npm ci
# Copy source files # Copy source files
COPY . . COPY . .
# Build-time env for Vite (supplied via build args)
ARG VITE_SUPABASE_URL
ARG VITE_SUPABASE_PUBLISHABLE_KEY
ARG VITE_SUPABASE_PROJECT_ID
ENV VITE_SUPABASE_URL=${VITE_SUPABASE_URL}
ENV VITE_SUPABASE_PUBLISHABLE_KEY=${VITE_SUPABASE_PUBLISHABLE_KEY}
ENV VITE_SUPABASE_PROJECT_ID=${VITE_SUPABASE_PROJECT_ID}
# Build the app # Build the app
RUN npm run build RUN npm run build

View File

@@ -5,8 +5,13 @@ services:
build: build:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
args:
VITE_SUPABASE_URL: ${VITE_SUPABASE_URL}
VITE_SUPABASE_PUBLISHABLE_KEY: ${VITE_SUPABASE_PUBLISHABLE_KEY}
VITE_SUPABASE_PROJECT_ID: ${VITE_SUPABASE_PROJECT_ID}
container_name: docker-webui container_name: docker-webui
network_mode: host ports:
- "${PORT:-8080}:8080"
environment: environment:
- TZ=${TZ:-Europe/Copenhagen} - TZ=${TZ:-Europe/Copenhagen}
- ADMIN_EMAIL=${ADMIN_EMAIL:-admin@docker-webui.local} - ADMIN_EMAIL=${ADMIN_EMAIL:-admin@docker-webui.local}

View File

@@ -44,9 +44,11 @@ const Login = () => {
setLoading(true); setLoading(true);
try { try {
const redirectUrl = `${window.location.origin}/`;
const { error } = await supabase.auth.signUp({ const { error } = await supabase.auth.signUp({
email, email,
password, password,
options: { emailRedirectTo: redirectUrl }
}); });
if (error) throw error; if (error) throw error;