Skip to content

Commit

Permalink
Fix ./setup.sh --docker by preventing NODE_ENV from defaulting to…
Browse files Browse the repository at this point in the history
… `production` during the Docker build process (reworkd#155)
  • Loading branch information
exil0867 committed Apr 15, 2023
1 parent 4cc4299 commit c7e6156
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Use the official Node.js image as the base image
FROM node:19-alpine

ARG NODE_ENV

ENV NODE_ENV=$NODE_ENV

# Set the working directory
WORKDIR /app

Expand Down
3 changes: 2 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ printf $ENV > .env

if [ "$1" = "--docker" ]; then
printf $ENV > .env.docker
docker build -t agentgpt .
source .env.docker
docker build --build-arg NODE_ENV=$NODE_ENV -t agentgpt .
docker run -d --name agentgpt -p 3000:3000 -v $(pwd)/db:/app/db agentgpt
else
printf $ENV > .env
Expand Down

0 comments on commit c7e6156

Please sign in to comment.