CD/CI with Docker Compose
Last updated: February 24, 2026
Contents Set Up Environment CloudLab You need to create a new branch (if you have not done so) from your main branch. The content of this new brand should be similar to Dr. Ngo’s Docker Branch . Go to your CloudLab profile on CloudLab. Click Edit, then click Update to refresh your ClouldLab content. The new branch should show up. Deploy your Cloud experiment, Docker branch, using Instantiate. For today’s lecture, each student should launch their own experiment. Setup GitHub repository Docker Hub Token Open a browser, visit Docker Hub and login to your account. On the top right corner, click on your profile, then select Account Settings Select Personal access tokens Click on Generate new token Access token description: GitHub Secret Expiration date: 90 days Access permissions: Read & Write Then click on Generate Keep the page with the personal access token open, as we will need that for later. Setup GitHub secret Go to the GitHub repository that you crealed earlier. Visit Settings/Secrets and variables/Actions/new repository secret Add the following secrets: DOCKERHUB_TOKEN: your DockerHub login name DOCKERHUB_USERNAME: The secret token generated by Docker Hub earlier. Setup GitHub runner Go to the GitHub repository that you crealed earlier. Visit Settings/Actions/Runners Click on New self-hosted runner Select Linux/x64 SSH into your Docker experiment on CloudLab Run all the commands under Download and Configure section. Keep the terminal open. Prepare The Service Making edit You can do this directly via the GitHub browser environment. Modify docker-compose.yml as follows Adjust lines 6 and 8 to replace my Docker Hub username with your DockerHub username. Modify .github/workflows/publish.yml as follows Adjust lines 5 and 15 with the branch containing your contents (most likely main) Adjust line 32 to replace my Docker Hub username with your DockerHub username. Deploy your service Login into your CloudLab Docker experiment using another terminal. Clone the Git repository (use HTTPS option) Change into the repository and run the followings:
1
2
docker compose build go_app --no-cache
docker compose up -d
Open a browser tab and use your experiment hostname at port 8080. Observe CD/CI Change to the test being displayed by editing the main.go file. Observe the Action workflow being carried out, and that the browser display the content of the web app being changed by refreshing. Good Things Does Not Last Community project containerr/Towerwatch is no longer supported as of this year. Everything can be fully controll via GitHub Actions. Examine the go_app_compose_cdci_2 branch , particularly the publish.yml file inside .github/workflows.