If I, or someone else makes changes to the repository, this creates a new docker image for the website. Currently, for the private server GitHub actions does not allow me to ssh into the server to continously deploy the website. For a public server, I will consider doing this later.
So, right now only the docker image gets created and gets uploaded to dockerhub automatically, and after that we need to manually deploy the server.
Assuming that the containers are already running, here are a list of commands that will allow the deployment of the website:
systemctl --user stop nyush_exchange_backend.service
# podman stop nyush_exchange_backend won't work because
# the .service file will immediately start the container again.
podman rm nyush_exchange_backend
podman pull docker.io/minjae07206/nyush_exchange_platform_backend:latest
podman create --name nyush_exchange_backend --network my-network --env-file /home/ml6722/.env -p 3389:3389 -v /var/www/uploads:/nyush_exchange_platform_server/var/www/uploads minjae07206/nyush_exchange_platform_backend:latest
systemctl --user start nyush_exchange_backend.service
Some things you can do to check for what is going on inside the containers.
podman logs nyush_exchange_backend # shows the backend code's console.log()
podman ps -a # lists all the containers that currently exist in the server, and their states.