Skip to content

Commit

Permalink
init: self hosting on kubernetes
Browse files Browse the repository at this point in the history
  • Loading branch information
PrinceBaghel258025 committed Oct 14, 2024
1 parent 518ae16 commit 2f630c9
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.next
node_modules
.dockerignore

33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Use an official Node.js runtime as the base image
FROM node:18-bullseye-slim

# Set the working directory in the container
WORKDIR /app

# Copy package.json and yarn.lock files
COPY package.json yarn.lock ./
RUN apt-get update && apt-get install -y \
build-essential \
python3 \
pkg-config \
libcairo2-dev \
libpango1.0-dev \
libgif-dev \
libpixman-1-dev \
libsqlcipher-dev \
&& rm -rf /var/lib/apt/lists/*
ENV PYTHON=python3
# Install dependencies
RUN yarn install

# Copy the rest of the application code, excluding node_modules
COPY . .

# Build the Next.js application
RUN yarn build

# Expose the port the app runs on
EXPOSE 3000

# Start the application
CMD ["yarn", "start"]
52 changes: 52 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: '3.8'

services:
echoes-app:
image: registry.myella.app/echoes:1
ports:
- "3000:3000"
environment:
- LITELLM_BASE_URL=${LITELLM_BASE_URL}
- LITELLM_API_KEY=${LITELLM_API_KEY}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
- OPEN_AI_API_KEY=${OPEN_AI_API_KEY}
- SUMMARY_ENDPOINT_URL=${SUMMARY_ENDPOINT_URL}
- LLAMA_API_KEY=${LLAMA_API_KEY}
- ANYSCALE_API_BASE=${ANYSCALE_API_BASE}
- ANYSCALE_API_KEY=${ANYSCALE_API_KEY}
- LANGCHAIN_TRACING_V2=${LANGCHAIN_TRACING_V2}
- LANGCHAIN_ENDPOINT=${LANGCHAIN_ENDPOINT}
- LANGCHAIN_API_KEY=${LANGCHAIN_API_KEY}
- LANGCHAIN_PROJECT=${LANGCHAIN_PROJECT}
- CLERK_SECRET_KEY=${CLERK_SECRET_KEY}
- NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=${NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY}
- REDIS_URL=${REDIS_URL}
- TURSO_DB_URL=${TURSO_DB_URL}
- TURSO_DB_AUTH_TOKEN=${TURSO_DB_AUTH_TOKEN}
- SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN}
- SENTRY_ORG=${SENTRY_ORG}
- SENTRY_PROJECT=${SENTRY_PROJECT}
- SENRY_DSN=${SENRY_DSN}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_REGION=${AWS_REGION}
- BUCKET_NAME=${BUCKET_NAME}
- IMAGE_PREFIX_URL=${IMAGE_PREFIX_URL}
- ZEPLO_TOKEN=${ZEPLO_TOKEN}
- ZEPLO_SECRET=${ZEPLO_SECRET}
- PQAI_API_KEY=${PQAI_API_KEY}
- ALGOLIA_WRITE_API_KEY=${ALGOLIA_WRITE_API_KEY}
- SUPERAGENT_API_KEY=${SUPERAGENT_API_KEY}
- NEXT_PUBLIC_IMAGE_PREFIX_URL=${NEXT_PUBLIC_IMAGE_PREFIX_URL}
- NEXT_PUBLIC_CLERK_SIGN_UP_URL=${NEXT_PUBLIC_CLERK_SIGN_UP_URL}
- NEXT_PUBLIC_CLERK_SIGN_IN_URL=${NEXT_PUBLIC_CLERK_SIGN_IN_URL}
- NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=${NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL}
- NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=${NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL}
- NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY=${NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY}
- NEXT_PUBLIC_ALGOLIA_APP_ID=${NEXT_PUBLIC_ALGOLIA_APP_ID}
- NEXT_PUBLIC_ALGOLIA_INDEX_NAME=${NEXT_PUBLIC_ALGOLIA_INDEX_NAME}
- NEXT_PUBLIC_ABLY_API_KEY=${NEXT_PUBLIC_ABLY_API_KEY}
- LANGSMITH_API_KEY=${LANGSMITH_API_KEY}
- SERP_API_KEY=${SERP_API_KEY}
- NEXT_PUBLIC_LIVEBLOCKS_PUBLIC_KEY=${NEXT_PUBLIC_LIVEBLOCKS_PUBLIC_KEY}
- NEXT_PUBLIC_LIVEBLOCKS_SECRET_KEY=${NEXT_PUBLIC_LIVEBLOCKS_SECRET_KEY}
1 change: 1 addition & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const nextConfig = {
// appDir: true,
// serverActions: true,
},
output: "standalone",
images: {
domains: [
"oaidalleapiprodscus.blob.core.windows.net",
Expand Down

0 comments on commit 2f630c9

Please sign in to comment.