-
Analyse the
meme-reviewer-backend
application and try to create a Dockerfile. -
Build the image with the tag
mr-backend:latest
. -
Run a container using the backend docker image.
-
Using a REST CLI/tool or your browser, send a GET request to the app using the following URL:
http://localhost:5000/api/meme
. It should return a status code of 200 (Success) with a JSON response body.
-
Analyse the
meme-reviewer-frontend
application and try to create a Dockerfile. -
Build the image with the tag
mr-frontend:latest
. -
Run a container using the frontend docker image.
-
Check if the two containers are running.
-
The two applications are running in containers. They should be able to communicate successfully. Go to the frontend (
http://localhost:3000
) and interact with the website a bit. -
Cleanup your containers using the
docker rm
command.
-
Check the size of the two Docker images.
-
There are many ways of optimising images. What changes will you do to your backend Dockerfile to ensure images have the lowest size possible? After modifying the Dockerfile, build the image again.
-
And to your frontend Dockerfile? After modifying the Dockerfile, build the image again.
-
Check the size of the two Docker images and compare with the previous output in step 1.
-
In the root of the repository create a file named
docker-compose.yml
. Try to create a service for the backend and test it. -
Use
docker-compose
command to create and run the backend container. -
After the backend is up and running try to create another service for the frontend.
-
Use
docker-compose
command to create and run the frontend container.
-
Go to https://portal.azure.com or if you're feeling cocky, login instead with the Azure CLI. You can do it by typing
az login
. -
Create a resource group with the following notation:
rg-dc2023-<your_name>
. -
Create an Azure Container Registry (ACR) with the following notation
dc2023<your_initials>
. -
Publish the previously built Docker images in the registry.
-
Create a web app for the backend in Azure using the portal or the CLI. See if you can select a Docker image from your registry for the web app.
-
Now, do it for the frontend. Do not forget about environment variables for a successful communication!
-
Test your deployed applications.