Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.

Commit

Permalink
docker: config file is now mounted
Browse files Browse the repository at this point in the history
  • Loading branch information
zleyyij committed Aug 27, 2023
1 parent 6c0493f commit f02af29
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ COPY package*.json .
RUN npm install --no-audit --omit=dev

# Copy code over
COPY config.jsonc ./
# COPY config.jsonc ./
COPY Makefile ./
COPY target/ ./target/

Expand Down
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,18 @@ docker-build: build
docker build . -t turingbot

# Start a pre-existing docker container in daemon mode
docker-start:
docker run --rm -d turingbot
# This may not work on windows, try copy pasting the command directly into powershell
docker-run:
# --rm: remove the container once it finishes running
# --name: docker will randomly generate a name if not manually specified
# -d: run in daemon mode and start in the background
# --mount type=bind...: take the config file in this directory, and mount it to the equivalent directory in the docker container
# turingbot: the container to run
docker run --rm --name turingbot -d --mount type=bind,source=$(pwd)/config.jsonc,target=/usr/src/turingbot/config.jsonc turingbot

# Make a bot docker container and start it in daemon mode
docker-run: docker-build
make docker-start
docker-start: docker-build
make docker-run

# Generate jsdoc documentation (https://github.com/ankitskvmdam/clean-jsdoc-theme-example)
docs:
Expand Down

0 comments on commit f02af29

Please sign in to comment.