generated from NEARBuilders/project-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from elliotBraem/feat/front-end
Adds a helper front end
- Loading branch information
Showing
52 changed files
with
1,732 additions
and
399 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# flyctl launch added from .gitignore | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
node_modules | ||
.pnp | ||
**/.pnp.js | ||
**/.yarn/install-state.gz | ||
.unlighthouse | ||
|
||
# testing | ||
coverage | ||
|
||
# next.js | ||
.next | ||
out | ||
|
||
# production | ||
build | ||
**/**/dist | ||
|
||
# misc | ||
**/.DS_Store | ||
**/*.pem | ||
|
||
# debug | ||
**/npm-debug.log* | ||
**/yarn-debug.log* | ||
**/yarn-error.log* | ||
|
||
# local env files | ||
**/.env*.local | ||
**/.env | ||
|
||
# vercel | ||
**/.vercel | ||
|
||
# typescript | ||
**/*.tsbuildinfo | ||
**/next-env.d.ts | ||
test-results | ||
playwright-report | ||
blob-report | ||
playwright/.cache | ||
|
||
**/.cache | ||
**/.db | ||
**/.turbo | ||
|
||
# flyctl launch added from frontend/.gitignore | ||
# Logs | ||
frontend/**/logs | ||
frontend/**/*.log | ||
frontend/**/npm-debug.log* | ||
frontend/**/yarn-debug.log* | ||
frontend/**/yarn-error.log* | ||
frontend/**/pnpm-debug.log* | ||
frontend/**/lerna-debug.log* | ||
|
||
frontend/node_modules | ||
frontend/dist | ||
frontend/**/dist-ssr | ||
frontend/**/*.local | ||
|
||
# Editor directories and files | ||
frontend/**/.vscode/* | ||
!frontend/**/.vscode/extensions.json | ||
frontend/**/.idea | ||
frontend/**/.DS_Store | ||
frontend/**/*.suo | ||
frontend/**/*.ntvs* | ||
frontend/**/*.njsproj | ||
frontend/**/*.sln | ||
frontend/**/*.sw? | ||
|
||
# flyctl launch added from frontend/node_modules/tailwindcss/stubs/.gitignore | ||
!frontend/node_modules/tailwindcss/stubs/**/* | ||
|
||
# flyctl launch added from node_modules/tailwindcss/stubs/.gitignore | ||
!node_modules/tailwindcss/stubs/**/* | ||
fly.toml |
This file was deleted.
Oops, something went wrong.
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,52 @@ | ||
FROM oven/bun as deps | ||
|
||
WORKDIR /app | ||
|
||
# Copy package files for all workspaces | ||
COPY package.json bun.lockb turbo.json ./ | ||
COPY frontend/package.json ./frontend/ | ||
COPY backend/package.json ./backend/ | ||
|
||
# Install dependencies | ||
RUN bun install | ||
|
||
# Build stage | ||
FROM oven/bun as builder | ||
WORKDIR /app | ||
|
||
# Set NODE_ENV for build process | ||
ENV NODE_ENV="production" | ||
|
||
# Copy all files from deps stage including node_modules | ||
COPY --from=deps /app ./ | ||
|
||
# Copy source code | ||
COPY . . | ||
|
||
# Build both frontend and backend | ||
RUN bun run build | ||
|
||
# Production stage | ||
FROM oven/bun as production | ||
WORKDIR /app | ||
|
||
# Create directory for mount with correct permissions | ||
RUN mkdir -p /.data/db /.data/cache && \ | ||
chown -R bun:bun /.data | ||
|
||
# Copy only necessary files from builder | ||
COPY --from=builder --chown=bun:bun /app/package.json /app/bun.lockb /app/turbo.json ./ | ||
COPY --from=builder --chown=bun:bun /app/node_modules ./node_modules | ||
COPY --from=builder --chown=bun:bun /app/frontend/dist ./frontend/dist | ||
COPY --from=builder --chown=bun:bun /app/backend/dist ./backend/dist | ||
|
||
# Set environment variables | ||
ENV DATABASE_URL="file:/.data/db/sqlite.db" | ||
ENV CACHE_DIR="/.data/cache" | ||
ENV NODE_ENV="production" | ||
|
||
# Expose the port | ||
EXPOSE 3000 | ||
|
||
# Start the application using the production start script | ||
CMD ["bun", "run", "start"] |
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
Oops, something went wrong.