Skip to content

Commit

Permalink
fix: local setup (#175)
Browse files Browse the repository at this point in the history
- 修一下本地 docker 启
  • Loading branch information
xingwanying authored Jul 2, 2024
2 parents 8fdb4fa + 907b47c commit c297d32
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docker/Dockerfile.vercel
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ COPY ./client .
# Uncomment the following line in case you want to disable telemetry during the build.
# ENV NEXT_TELEMETRY_DISABLED 1

ENV NEXT_PUBLIC_API_DOMAIN ${NEXT_PUBLIC_API_DOMAIN}
ENV NEXT_STANDALONE true

RUN ls
RUN \
Expand Down Expand Up @@ -64,6 +64,7 @@ USER nextjs
EXPOSE 3000

ENV PORT 3000
ENV NEXT_PUBLIC_API_DOMAIN ${NEXT_PUBLIC_API_DOMAIN}

# server.js is created by next build from the standalone output
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
Expand Down
2 changes: 2 additions & 0 deletions server/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
SUPABASE_URL=supabase_url
SUPABASE_SERVICE_KEY=supabase_service_key

CORS_ORIGIN_WHITELIST=localhost:3000

# OPTIONAL - Github Apps Configures
X_GITHUB_APP_ID=github_app_id
X_GITHUB_APPS_CLIENT_ID=github_apps_client_id
Expand Down
2 changes: 1 addition & 1 deletion server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
secret_key = session_secret_key,
)

cors_origins = ["*"] + cors_origins_whitelist.split(',')
cors_origins = ["http://0.0.0.0:3000", "http://localhost:3000"] + cors_origins_whitelist.split(',')

app.add_middleware(
CORSMiddleware,
Expand Down

0 comments on commit c297d32

Please sign in to comment.