From f6019f63c6fe9ef5c35d2620771cf46a6a826731 Mon Sep 17 00:00:00 2001 From: dreth Date: Sat, 27 Jul 2024 19:50:57 +0200 Subject: [PATCH] modify dockerfile and start.sh so that the env vars are properly configured --- Dockerfile | 3 --- start.sh | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 65a00ec..ce25773 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,9 +35,6 @@ COPY frontend/ ./frontend # Copy the backend code into the container. COPY backend/ ./backend -# Build the Next.js app -RUN cd frontend && npm run build - # Install additional tools RUN apk add --no-cache tzdata sqlite sqlite-dev ca-certificates bash gcc diff --git a/start.sh b/start.sh index dbd19ad..2ef397f 100755 --- a/start.sh +++ b/start.sh @@ -10,8 +10,9 @@ if [ ! -f hbd.db ]; then fi # Start the Go API server -./main & +/app/backend/main & # Start the Next.js server -cd ../frontend +# Build the frontend and run it +cd /app/frontend && npm run build npm run start -- --port $PORT --hostname 0.0.0.0