I have the following docker-compose.yml:
version: '3'
services:
server:
build:
context: ../../
dockerfile: ./packages/website/Dockerfile
command: yarn serve
environment:
PORT: 3000
NODE_ENV: production
restart: always
nginx:
build:
context: ./
dockerfile: ./nginx/Dockerfile
command: nginx -c /etc/nginx/nginx.conf -g "daemon off;"
depends_on:
- server
ports:
- "80:80"
restart: always
What is the best way for me to get this set up into Amazon ECR?
My thoughts were to push the images that are built from the above docker-compose.yml file into an AWS repository and then create a new docker-compose.yml that used the image setting, e.g. image: ecr-image-url
to reference the images.
Is there a better way?