From 33bedabfbd0e65b3c50732d7f635eb115a3abe33 Mon Sep 17 00:00:00 2001 From: amirrr <6696894+amirrr@users.noreply.github.com> Date: Fri, 28 Jun 2024 16:11:34 +0200 Subject: [PATCH] change docker --- .github/workflows/aws-deploy.yml | 2 +- Dockerfile | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/aws-deploy.yml b/.github/workflows/aws-deploy.yml index 7c58cd7..00aaaa7 100644 --- a/.github/workflows/aws-deploy.yml +++ b/.github/workflows/aws-deploy.yml @@ -7,7 +7,7 @@ on: env: AWS_REGION: us-east-1 # AWS region, e.g. us-west-1 ECR_REPOSITORY: atlas # Amazon ECR repository name - ECS_SERVICE: atlas-service # Amazon ECS service name + ECS_SERVICE: service-service # Amazon ECS service name ECS_CLUSTER: atlas-cluster # Amazon ECS cluster name ECS_TASK_DEFINITION: .aws/task-definition.json # Amazon ECS task definition CONTAINER_NAME: atlas diff --git a/Dockerfile b/Dockerfile index 301935c..b824aa8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build step #1: build the React front end -FROM node:18-alpine as build-step +FROM --platform=linux/amd64 public.ecr.aws/bitnami/node:20 as build-step WORKDIR /app ENV PATH /app/node_modules/.bin:$PATH COPY client/package*.json ./ @@ -8,7 +8,7 @@ COPY client/ ./ RUN npm run build # Build step #2: build the API with the client as static files -FROM python:3.9 +FROM public.ecr.aws/docker/library/python:3.10 WORKDIR /app COPY --from=build-step /app/dist ./build @@ -18,7 +18,6 @@ RUN pip install -r ./api/requirements.txt RUN pip install gunicorn ENV FLASK_ENV production - EXPOSE 8000 WORKDIR /app/api CMD ["gunicorn", "-b", ":8000", "api:app"] \ No newline at end of file