Skip to content

Commit

Permalink
Create new /app dir for database and .env in container.
Browse files Browse the repository at this point in the history
  • Loading branch information
cbloodsworth committed Feb 13, 2025
1 parent adac35c commit 4570f5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ RUN apt-get update \
&& apt-get -y install libsqlite3-0 \
&& rm -rf /var/lib/apt/lists/*

# Create a directory for runtime files
WORKDIR /app

# Copy the built binary from the builder stage
COPY --from=builder /usr/local/bin/leekbot /usr/local/bin/leekbot

Expand Down
6 changes: 3 additions & 3 deletions start_container.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/usr/bin/bash -e

IMAGE=ghcr.io/cbloodsworth/leekbot-2.0:main
CONTAINER_LEEKBOT=/usr/src/leekbot
APPDIR=/app

if [ -z ${LEEKBOT+x} ]; then
echo '$LEEKBOT is not set; I need to know where the project repository is.'
exit 1
fi

docker run \
--volume "$LEEKBOT/db:$CONTAINER_LEEKBOT/db" \
--volume "$LEEKBOT/.env:$CONTAINER_LEEKBOT/.env" \
--volume "$LEEKBOT/db:$APPDIR/db" \
--volume "$LEEKBOT/.env:$APPDIR/.env" \
--detach \
--name "leekbot" \
$IMAGE

0 comments on commit 4570f5f

Please sign in to comment.