-
Checkout the commit with tag name
assignment-5
(its commit SHA should be23c5fd2d8926797ad21754b8c61bc5206b0e0883
) -
Unzip the
Assignment5-secrets.zip
file. -
Move the unzipped files to the correct locations:
./secrets/auth_service_mongo_uri.txt
./secrets/auth_service_session_secret.txt
./secrets/question_service_mongo_uri.txt
./secrets/user_service_username.txt
./secrets/user_service_password.txt
./secrets/user_service_host.txt
-
Ensure that the Docker daemon is running. The easiest way to do this is to launch the Docker Desktop application.
-
Ensure that Docker
swarm
mode is enabled (this is required to use Docker secrets). To enable Dockerswarm
mode, run the following command in a terminal:docker swarm init
-
To build the Docker images (using the Docker compose file) and run the Docker containers, open a terminal in the root directory of the project and run the following command:
# To build the images and run the containers docker-compose up --build # To build the images and run the containers in the background docker-compose up --build -d
-
Just like assignment 3, we have a basic user with username
john
and passwordpassword
, and an admin / maintainer user with usernamemary
and passwordmary
. -
To stop all the Dockers containers, either press
Ctrl + C
or run the following command:docker-compose down