SAE Cloud Lectures

This repository contains an example backend application for the SAE Cloud Lectures. It demonstrates the use of Docker, Docker Compose, AWS S3, and Terraform in conjunction with Localstack.

How to run the Dockerfiles

Build the Docker images

docker build -t sae-cloud-lectures-backend:latest .

Run the Docker containers

docker run -p 3000:3000 --name running-container sae-cloud-lectures-backend:latest

Stop the Docker containers

docker stop running-container

Push the Docker image to Docker Hub

Login to Docker Hub

docker login

Tag the Docker image

docker tag sae-cloud-lectures-backend:latest <your-docker-hub-username>/sae-cloud-lectures-backend:latest

Push the Docker image

docker push <your-docker-hub-username>/sae-cloud-lectures-backend:latest

Remove the Docker containers

docker rm running-container

Remove the Docker images

docker rmi sae-cloud-lectures-backend:latest

Warning for Mac users

If you are using Docker on a Mac, you need to use the following flag and append it to the docker build command:

--platform linux/amd64

More on this in the lecture

How to run the Docker Compose file

Build the Docker compose images

docker compose build

Run the Docker compose containers

docker compose up -d

Stop the Docker compose containers

docker compose down