Skip to content
Closed
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
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Using most recent LTS version of debian slim
FROM node:lts-slim

# Create app home directory and appuser, so code execution isn't as root.
ENV APP_HOME /usr/src/app
RUN useradd appuser --shell /bin/bash --no-log-init --create-home --home $APP_HOME

# Switching to appuser
USER appuser

# Current directory app directory
WORKDIR $APP_HOME

# Install app dependencies
COPY --chown=appuser [ "package.json", "yarn.lock", "./"]
RUN yarn install

# Copy over files
# Using separate step in order to allow caching, if the code changes but dependencies don't
COPY --chown=appuser ["index.js", "prompt.md", "./"]
COPY --chown=appuser ["src", "./src"]

# Default run command
CMD ["node", "index.js"]
10 changes: 10 additions & 0 deletions env.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
OPEN_AI_KEY=${OPEN_AI_KEY}
BEARER_TOKEN=${BEARER_TOKEN}
OPEN_AI_MODEL=gpt-3.5-turbo
TELEGRAM_TOKEN=${TELEGRAM_TOKEN}
EMBEDDINGS_URL=${APP_URL}/memory
SERVER_PORT=8080
STORAGE_NAME=${STORAGE_NAME}
STORAGE_URL=${STORAGE_URL}
STORAGE_KEY=${STORAGE_KEY}
STORAGE_SECRET=${STORAGE_SECRET}