diff --git a/Dockerfile b/Dockerfile index dcd4c1d..b4c1ef6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/start_container.sh b/start_container.sh index 0c36c06..30cbb68 100755 --- a/start_container.sh +++ b/start_container.sh @@ -1,7 +1,7 @@ #!/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.' @@ -9,8 +9,8 @@ if [ -z ${LEEKBOT+x} ]; then 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