Skip to content

This repository builds the docker image for the SMTP Relay server and pushes it to the Shared Services Elastic Container Repository

License

Notifications You must be signed in to change notification settings

ministryofjustice/staff-infrastructure-smtp-relay-server

Repository files navigation

repo standards badge

Staff Infrastructure SMTP Relay Server

Introduction

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.

Related Repositories

This repository builds the docker image for SMTP Relay server only. Here are some of the other related repositories:

Technical Guide

Once you have deployed the infrastructure, you may use this guide to build and push the SMTP Relay server image.

Prerequisites

To be able to follow this guide, you need to have the following already:

🎉 TIP
You may configure your AWS Vault to use AWS SSO. A step-by-step guide can be found in our team documentation site.

Prepare the variables

  1. Clone this repo to a local directory.
  2. Copy .env.example to .env.
  3. Modify the .env file and replace all placeholders with correct values.

Authenticate Docker with AWS ECR

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

Build the image

  1. To build the image on your local docker, run:
make build-dev

Run the server locally

  1. To run the SMTP Relay server on your local docker, run:
make run

Test locally

  1. To test the build locally, run:
make test

Push your docker image

  1. To push the built image on to your isolated ECR repository, run:
make publish  

Deploy a force remote ECS restart

make deploy  

Stopping Local Environment

Once you have finished using the docker image, to shut down the environment, run:

make stop  

About

This repository builds the docker image for the SMTP Relay server and pushes it to the Shared Services Elastic Container Repository

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published