diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a6582b4 --- /dev/null +++ b/Dockerfile @@ -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"] \ No newline at end of file diff --git a/env.list b/env.list new file mode 100644 index 0000000..68d8ff2 --- /dev/null +++ b/env.list @@ -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} \ No newline at end of file