-
Navigate to the project directory:
cd workspace/ahi-backend/
-
Check the active Git branch: Ensure you’re on the
master
branch.git branch
- The output should indicate that the
master
branch is active.
- The output should indicate that the
-
Pull the latest changes from the
master
branch:git pull origin master
-
Rebuild the Docker image:
- Build a new Docker image for
ahi-backend
version1.2.33
using thealpine.Dockerfile
.
docker build -f alpine.Dockerfile -t gmfdev24/ahi-backend:1.2.33 .
- Build a new Docker image for
-
Navigate to the Docker configuration directory for
ahi-backend
:cd server-docker-config/ahi-backend/
-
Edit the
docker-compose.yml
file:- Open the
docker-compose.yml
file using a text editor likenano
.
nano docker-compose.yml
- Locate the line specifying the image version, and update it from:
to:
image: gmfdev24/ahi-backend:1.2.32
image: gmfdev24/ahi-backend:1.2.33
- Open the
-
Check the running Docker containers:
- Find the currently running
ahi-backend
container.
docker ps -a | grep ahi
- Note the
CONTAINER ID
for the container running version1.2.32
.
- Find the currently running
-
Stop and remove the old container:
- Replace
ae34cec1FPM
with theCONTAINER ID
of the old container if different.
docker stop ae34cec1FPM && docker rm ae34cec1FPM
- Replace
-
Re-run
docker-compose
with the new image:- Use
--force-recreate
to ensure the container is updated.
docker compose up -d --force-recreate
- Use
After these steps, the deployment of version 1.2.33
should be complete, and ahi-backend
will be running with the updated image.