Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions langsuit/.dockerignore
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
30 changes: 30 additions & 0 deletions langsuit/Dockerfile
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"]
36 changes: 36 additions & 0 deletions langsuit/docker-compose.yml
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
Comment on lines +8 to +12
Copy link

Copilot AI May 1, 2025

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.

Suggested change
- NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
- NEXT_PUBLIC_CLERK_SIGN_IN_URL
- NEXT_PUBLIC_CLERK_SIGN_UP_URL
- NEXT_PUBLIC_APP_URL
- ENVIRONMENT
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ""
NEXT_PUBLIC_CLERK_SIGN_IN_URL: ""
NEXT_PUBLIC_CLERK_SIGN_UP_URL: ""
NEXT_PUBLIC_APP_URL: ""
ENVIRONMENT: "development"

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI May 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider adding inline comments or providing external documentation on the purpose and expected values of each environment variable to improve clarity for future maintenance.

Suggested change
- 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)

Copilot uses AI. Check for mistakes.
env_file:
- .env
restart: always
networks:
- app_network

networks:
app_network:
driver: bridge
Loading