This repository builds the docker image for the SMTP Relay server and pushes it to the Shared Services Elastic Container Repository, so that the pre-configured ECS task can pull down this image and launch a new container.
This repository depends on the network services infrastructure repository, which builds the underlying base infrastructure with required ECR repository and ECS service definitions to work with this docker image.
This repository builds the docker image for SMTP Relay server only. Here are some of the other related repositories:
Once you have deployed the infrastructure, you may use this guide to build and push the SMTP Relay server image.
To be able to follow this guide, you need to have the following already:
- System infrastructure deployed
- Docker
- AWS Vault set up.
- Access to Moj AWS SSO.
- jq installed.
🎉 TIP |
---|
You may configure your AWS Vault to use AWS SSO. A step-by-step guide can be found in our team documentation site. |
- Clone this repo to a local directory.
- Copy
.env.example
to.env
. - Modify the
.env
file and replace all placeholders with correct values.
The Docker base image is stored in ECR. Prior to building the container you must authenticate Docker to the ECR registry. Details can be found here.
If you have aws-vault configured with credentials for shared services, do the following to authenticate:
make authenticate-docker
- To build the image on your local docker, run:
make build-dev
- To run the SMTP Relay server on your local docker, run:
make run
- To test the build locally, run:
make test
- To push the built image on to your isolated ECR repository, run:
make publish
make deploy
Once you have finished using the docker image, to shut down the environment, run:
make stop