File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -112,11 +112,20 @@ jobs:
112112 run : |
113113 ssh -i private_key -o StrictHostKeyChecking=no ${{ secrets.GCP_USERNAME }}@${{ secrets.GCP_VM_IP }} << 'EOF'
114114 cd /home/masahisasekita/term-group-project-c01w25-project-course-matrix || { echo "Error: Directory /root/myapp does not exist!"; exit 1; }
115+
116+ sudo docker rmi -f $(sudo docker images -q)
117+ sudo docker system prune -a --volumes -f
115118
116119 # Pull the latest images
117120 docker pull ${{ secrets.DOCKERHUB_USERNAME }}/course-matrix-frontend:master
118121 docker pull ${{ secrets.DOCKERHUB_USERNAME }}/course-matrix-backend:master
119122
123+ # Run the frontend container
124+ docker run -d -p 5173:5173 ${{ secrets.DOCKERHUB_USERNAME }}/course-matrix-frontend:master
125+
126+ # Run the backend container
127+ docker run -d -p 8081:8081 ${{ secrets.DOCKERHUB_USERNAME }}/course-matrix-backend:master
128+
120129 # Stop and remove existing containers
121130 docker compose down
122131
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ RUN npm install
1414COPY . .
1515
1616# Expose the frontend port
17+ EXPOSE 8081
1718EXPOSE 5173
1819
1920# Start the application
You can’t perform that action at this time.
0 commit comments