Skip to content

Commit

Permalink
Merge pull request #97 from gamultong/enhancement/docker-volume
Browse files Browse the repository at this point in the history
sqlite3 파일 호스트에 노출시키기
  • Loading branch information
onee-only authored Dec 29, 2024
2 parents b465f19 + ead80d9 commit 2646d10
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
FROM python:3.12.5

WORKDIR /app

RUN mkdir -p /var/lib/gamulpung

COPY . .

RUN pip install -r requirements.txt
Expand Down
8 changes: 7 additions & 1 deletion tools/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ fi
IMAGE_NAME="dojini/minesweeper:latest"
CONTAINER_NAME="minesweeper"
ENV_FILE_PATH=".env"
VOLUME_MOUNT_PATH="/var/lib/gamulpung"

# 컨테이너가 존재하는지 확인
if sudo docker ps -a --format '{{.Names}}' | grep -q "^${CONTAINER_NAME}$"
Expand All @@ -30,4 +31,9 @@ then
sudo docker rmi $IMAGE_NAME
fi

sudo docker run -it -d -p 80:8000 --env-file $ENV_FILE_PATH --name $CONTAINER_NAME $IMAGE_NAME
sudo docker run -it -d
-p 80:8000 \
-v ".:$VOLUME_MOUNT_PATH" \
--env-file $ENV_FILE_PATH \
--name $CONTAINER_NAME \
$IMAGE_NAME

0 comments on commit 2646d10

Please sign in to comment.