Skip to content

Commit

Permalink
Merge pull request #66 from snuhcs-course/feat/tmux_fix
Browse files Browse the repository at this point in the history
Feat/tmux fix
  • Loading branch information
SeongjunJo authored Nov 21, 2023
2 parents 3dccf1b + 3aa1f32 commit c26af58
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 21 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/docker_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ jobs:
docker rm haeng
echo "Removing unused Docker images..."
docker rmi "${{ secrets.DOCKER_USERNAME }}/haengsha-backend:latest"
echo "Killing all tmux sessions..."
tmux kill-server
echo "Pulling new image..."
docker pull "${{ secrets.DOCKER_USERNAME }}/haengsha-backend:latest"
docker run -d --name haeng -p 8080:8000 --env-file haengsha-env/.env "${{ secrets.DOCKER_USERNAME }}/haengsha-backend:latest"
docker exec -it haeng /bin/bash
tmux new-session -t 0
docker exec -it haeng /bin/bash
bash recommendation_pipeline.sh
tmux detach-client
exit
EOF
EOF
8 changes: 3 additions & 5 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ FROM python:3.11.5
WORKDIR /app

COPY requirements.txt requirements.txt
RUN pip install —-no-cache-dir -r requirements.txt && \
apt-get update && \
apt-get upgrade && \
apt-get install tmux
RUN pip install --no-cache-dir -r requirements.txt
RUN apt-get update && apt-get install -y tmux

COPY . .

CMD ["gunicorn", "haengsha.wsgi:application", "bind", "0.0.0.0:8000"]
CMD ["gunicorn", "haengsha.wsgi:application", "--bind", "0.0.0.0:8000"]
14 changes: 0 additions & 14 deletions backend/recommend/Dockerfile

This file was deleted.

0 comments on commit c26af58

Please sign in to comment.