Skip to content

Commit

Permalink
Single Docker - use Terrarium public image
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneLightsOn committed Apr 24, 2024
1 parent aa840b8 commit 1b2cff1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docker_scripts/functions
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,6 @@ run_frontend() {
run_terrarium() {
cd /usr/src/app
echo "Starting Terrarium..."
pm2 start node -- index.js
pm2 start node -- /usr/bin/ts-node -- src/index.ts
echo "Terrarium started..."
}
8 changes: 5 additions & 3 deletions standalone.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM ghcr.io/cohere-ai/terrarium:latest as terrarium

FROM buildpack-deps:buster
LABEL authors="Cohere"

## set ENV for python
ENV PYTHON_VERSION=3.11.8
ENV PYTHONDONTWRITEBYTECODE=1
Expand Down Expand Up @@ -103,10 +104,11 @@ RUN pnpm install

# Terrarium
WORKDIR /usr/src/app
COPY src/terrarium/package*.json ./
RUN npm install -g ts-node
COPY --from=terrarium /usr/src/app/package*.json ./
RUN npm install
RUN npm prune --production
COPY src/terrarium/. .
COPY --from=terrarium /usr/src/app/. .
ENV ENV_RUN_AS "docker"

# Ports to expose
Expand Down

0 comments on commit 1b2cff1

Please sign in to comment.