diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..f250f986b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# Base image +FROM node:14 + +# Create app directory +WORKDIR /app + +# Copy app files +COPY . . + +# Install dependencies +RUN npm install && npm cache clean --force && npm install -g pnpm + +# Expose ports +EXPOSE 3000 + +# Set environment variables +ENV NODE_ENV=production + +# Start the app +CMD ["pnpm", "run", "start"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..672952354 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +version: "3.9" +services: + app: + build: . + ports: + - "3000:3000" + environment: + - OPENAI_API_KEY=${OPENAI_API_KEY} + - PINECONE_API_KEY=${PINECONE_API_KEY} + - PINECONE_ENVIRONMENT=${PINECONE_ENVIRONMENT} + - PINECONE_INDEX_NAME=${PINECONE_INDEX_NAME} + volumes: + - ./docs:/app/docs + - ./.env:/app/.env