-
Notifications
You must be signed in to change notification settings - Fork 3
Docker #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Docker #74
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,14 @@ | ||
| .git | ||
| .gitignore | ||
| node_modules | ||
| npm-debug.log | ||
| README.md | ||
| .next | ||
| .env* | ||
| .vercel | ||
| coverage | ||
| .DS_Store | ||
| *.pem | ||
| dist | ||
| build | ||
| .vscode |
This file contains hidden or 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,30 @@ | ||
| FROM node:18-alpine | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| # Copy package files first to leverage Docker cache | ||
| COPY package*.json ./ | ||
|
|
||
| # Install dependencies | ||
| RUN npm install | ||
|
|
||
| # Copy the rest of the application code | ||
| COPY . . | ||
|
|
||
| # Only set build-time args for NEXT_PUBLIC_ variables needed at build time | ||
| ARG NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | ||
| ARG NEXT_PUBLIC_CLERK_SIGN_IN_URL | ||
| ARG NEXT_PUBLIC_CLERK_SIGN_UP_URL | ||
| ARG NEXT_PUBLIC_APP_URL | ||
|
|
||
| ENV NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=${NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY} | ||
| ENV NEXT_PUBLIC_CLERK_SIGN_IN_URL=${NEXT_PUBLIC_CLERK_SIGN_IN_URL} | ||
| ENV NEXT_PUBLIC_CLERK_SIGN_UP_URL=${NEXT_PUBLIC_CLERK_SIGN_UP_URL} | ||
| ENV NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL} | ||
|
|
||
| # Build the application | ||
| RUN npm run build | ||
|
|
||
| EXPOSE 3000 | ||
|
|
||
| CMD ["npm", "start"] |
This file contains hidden or 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,36 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| version: "3.8" | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| services: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| web: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| build: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| context: . | ||||||||||||||||||||||||||||||||||||||||||||||||||
| args: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - NEXT_PUBLIC_CLERK_SIGN_IN_URL | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - NEXT_PUBLIC_CLERK_SIGN_UP_URL | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - NEXT_PUBLIC_APP_URL | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - ENVIRONMENT | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ports: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - "3000:3000" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| environment: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - DATABASE_URL | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - CLERK_SECRET_KEY | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - NEXT_PUBLIC_CLERK_SIGN_IN_URL | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - NEXT_PUBLIC_CLERK_SIGN_UP_URL | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - MONGODB_URI | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - CLERK_ADMIN_IDS | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - STRIPE_API_SECRET_KEY | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - STRIPE_WEBHOOK_SECRET | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - NEXT_PUBLIC_APP_URL | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - REDIS_URL | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - ENVIRONMENT | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+16
to
+27
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| - DATABASE_URL | |
| - NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | |
| - CLERK_SECRET_KEY | |
| - NEXT_PUBLIC_CLERK_SIGN_IN_URL | |
| - NEXT_PUBLIC_CLERK_SIGN_UP_URL | |
| - MONGODB_URI | |
| - CLERK_ADMIN_IDS | |
| - STRIPE_API_SECRET_KEY | |
| - STRIPE_WEBHOOK_SECRET | |
| - NEXT_PUBLIC_APP_URL | |
| - REDIS_URL | |
| - ENVIRONMENT | |
| - DATABASE_URL # URL for the database connection (e.g., PostgreSQL, MySQL) | |
| - NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY # Public API key for Clerk authentication (used on the client-side) | |
| - CLERK_SECRET_KEY # Secret API key for Clerk authentication (used on the server-side) | |
| - NEXT_PUBLIC_CLERK_SIGN_IN_URL # URL for the Clerk sign-in page | |
| - NEXT_PUBLIC_CLERK_SIGN_UP_URL # URL for the Clerk sign-up page | |
| - MONGODB_URI # Connection string for MongoDB database | |
| - CLERK_ADMIN_IDS # Comma-separated list of Clerk admin user IDs | |
| - STRIPE_API_SECRET_KEY # Secret API key for Stripe payment processing | |
| - STRIPE_WEBHOOK_SECRET # Secret for verifying Stripe webhook signatures | |
| - NEXT_PUBLIC_APP_URL # Public URL of the application (used on the client-side) | |
| - REDIS_URL # URL for the Redis instance (used for caching or session storage) | |
| - ENVIRONMENT # Application environment (e.g., development, production) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider specifying build arguments as key-value pairs (with default values if appropriate) instead of a list of names. This can make the Docker build configuration clearer and easier to maintain.