-
Notifications
You must be signed in to change notification settings - Fork 514
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
189 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Dependency directories | ||
node_modules | ||
**/node_modules | ||
|
||
# Log files | ||
*.log | ||
|
||
# Version control | ||
.git | ||
|
||
# System files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# Editor directories | ||
.idea/ | ||
.vscode/ | ||
|
||
# Build outputs | ||
dist/ | ||
build/ | ||
out/ | ||
.coverage/ | ||
.turbo/ | ||
.next/ | ||
|
||
# Documentation & Tests | ||
*.md | ||
LICENSE | ||
test/ | ||
tests/ | ||
__tests__/ | ||
|
||
# Environment configs | ||
.env* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
FROM oven/bun:1 as base | ||
|
||
ARG API_ROUTE_SECRET | ||
ENV API_ROUTE_SECRET=$API_ROUTE_SECRET | ||
|
||
ARG DUB_API_KEY | ||
ENV DUB_API_KEY=$DUB_API_KEY | ||
|
||
ARG EDGE_CONFIG | ||
ENV EDGE_CONFIG=$EDGE_CONFIG | ||
|
||
ARG GOCARDLESS_SECRET_ID | ||
ENV GOCARDLESS_SECRET_ID=$GOCARDLESS_SECRET_ID | ||
|
||
ARG GOCARDLESS_SECRET_KEY | ||
ENV GOCARDLESS_SECRET_KEY=$GOCARDLESS_SECRET_KEY | ||
|
||
ARG LOGSNAG_PRIVATE_TOKEN | ||
ENV LOGSNAG_PRIVATE_TOKEN=$LOGSNAG_PRIVATE_TOKEN | ||
|
||
ARG LOOPS_API_KEY | ||
ENV LOOPS_API_KEY=$LOOPS_API_KEY | ||
|
||
ARG LOOPS_ENDPOINT | ||
ENV LOOPS_ENDPOINT=$LOOPS_ENDPOINT | ||
|
||
ARG NOVU_API_KEY | ||
ENV NOVU_API_KEY=$NOVU_API_KEY | ||
|
||
ARG OPENAI_API_KEY | ||
ENV OPENAI_API_KEY=$OPENAI_API_KEY | ||
|
||
ARG PLAID_CLIENT_ID | ||
ENV PLAID_CLIENT_ID=$PLAID_CLIENT_ID | ||
|
||
ARG PLAID_CLIENT_SECRET | ||
ENV PLAID_CLIENT_SECRET=$PLAID_CLIENT_SECRET | ||
|
||
ARG RESEND_API_KEY | ||
ENV RESEND_API_KEY=$RESEND_API_KEY | ||
|
||
ARG SUPABASE_SERVICE_KEY | ||
ENV SUPABASE_SERVICE_KEY=$SUPABASE_SERVICE_KEY | ||
|
||
ARG TRIGGER_API_KEY | ||
ENV TRIGGER_API_KEY=$TRIGGER_API_KEY | ||
|
||
ARG TRIGGER_API_URL | ||
ENV TRIGGER_API_URL=$TRIGGER_API_URL | ||
|
||
ARG UPSTASH_REDIS_REST_TOKEN | ||
ENV UPSTASH_REDIS_REST_TOKEN=$UPSTASH_REDIS_REST_TOKEN | ||
|
||
ARG UPSTASH_REDIS_REST_URL | ||
ENV UPSTASH_REDIS_REST_URL=$UPSTASH_REDIS_REST_URL | ||
|
||
ARG NEXT_PUBLIC_LOGSNAG_PROJECT | ||
ENV NEXT_PUBLIC_LOGSNAG_PROJECT=$NEXT_PUBLIC_LOGSNAG_PROJECT | ||
|
||
ARG NEXT_PUBLIC_LOGSNAG_TOKEN | ||
ENV NEXT_PUBLIC_LOGSNAG_TOKEN=$NEXT_PUBLIC_LOGSNAG_TOKEN | ||
|
||
ARG NEXT_PUBLIC_NOVU_APPLICATION_IDENTIFIER | ||
ENV NEXT_PUBLIC_NOVU_APPLICATION_IDENTIFIER=$NEXT_PUBLIC_NOVU_APPLICATION_IDENTIFIER | ||
|
||
ARG NEXT_PUBLIC_SUPABASE_ANON_KEY | ||
ENV NEXT_PUBLIC_SUPABASE_ANON_KEY=$NEXT_PUBLIC_SUPABASE_ANON_KEY | ||
|
||
ARG NEXT_PUBLIC_SUPABASE_ID | ||
ENV NEXT_PUBLIC_SUPABASE_ID=$NEXT_PUBLIC_SUPABASE_ID | ||
|
||
ARG NEXT_PUBLIC_SUPABASE_URL | ||
ENV NEXT_PUBLIC_SUPABASE_URL=$NEXT_PUBLIC_SUPABASE_URL | ||
|
||
ARG NEXT_PUBLIC_SUPABASE_URL | ||
ENV NEXT_PUBLIC_SUPABASE_URL=$NEXT_PUBLIC_SUPABASE_URL | ||
|
||
ARG NEXT_PUBLIC_TRIGGER_API_KEY | ||
ENV NEXT_PUBLIC_TRIGGER_API_KEY=$NEXT_PUBLIC_TRIGGER_API_KEY | ||
|
||
|
||
# Add lockfile and package.json's of isolated subworkspace | ||
FROM base AS installer | ||
WORKDIR /app | ||
|
||
# First install the dependencies (as they change less often) | ||
COPY . . | ||
RUN bun install --frozen-lockfile | ||
|
||
# Build the project | ||
RUN bun run build --filter=@midday/dashboard | ||
|
||
FROM base AS runner | ||
WORKDIR /app | ||
|
||
# Don't run production as root | ||
RUN adduser --system --uid 1001 dashboard | ||
USER dashboard | ||
|
||
ENV NEXT_TELEMETRY_DISABLED 1 | ||
ENV NODE_ENV production | ||
|
||
COPY --from=installer /app/apps/dashboard/next.config.mjs . | ||
|
||
# Automatically leverage output traces to reduce image size | ||
# https://nextjs.org/docs/advanced-features/output-file-tracing | ||
COPY --from=installer --chown=dashboard:bun /app/apps/dashboard/.next/standalone ./ | ||
COPY --from=installer --chown=dashboard:bun /app/apps/dashboard/.next/static ./apps/dashboard/.next/static | ||
COPY --from=installer --chown=dashboard:bun /app/apps/dashboard/public ./apps/dashboard/public | ||
|
||
CMD node apps/dashboard/server.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters