From 8f42ff062cee22ed426fefacc0e4db2095d5e00b Mon Sep 17 00:00:00 2001 From: Girts Popovs Date: Wed, 11 Dec 2024 16:45:18 +0200 Subject: [PATCH 1/3] updates to Dockerfile to make it work in aws --- Dockerfile | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 26f325c..0a5c743 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,24 @@ -FROM node:22.11.0-slim +# Base image with corepack and pnpm enabled +FROM 310118226683.dkr.ecr.eu-west-1.amazonaws.com/node:23.3.0-slim -# Create app directory -WORKDIR /usr/src/app +RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* +# Setup doppler +RUN (curl -Ls --tlsv1.2 --proto "=https" --retry 3 https://cli.doppler.com/install.sh ) | sh -# Copy package.json and package-lock.json -COPY package*.json ./ +# Set up pnpm environment +ENV PNPM_HOME="/pnpm" +ENV PATH="$PNPM_HOME:$PATH" +RUN corepack enable -# Install app dependencies -RUN npm ci - -# Bundle app source +# Set working directory +WORKDIR /app COPY . . -# Build the TypeScript files -RUN npm run build +RUN pnpm i +RUN pnpm run build -# Expose port 8080 -EXPOSE 8080 +# Expose the application port +EXPOSE 8000 -# Start the app -CMD npm run start +# Start the application +CMD ["pnpm", "run", "doppler:syncdev"] From 7f83e041a24fa432f19b355e3b277fb8c67c5a96 Mon Sep 17 00:00:00 2001 From: Girts Popovs Date: Thu, 12 Dec 2024 12:23:17 +0200 Subject: [PATCH 2/3] update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0a5c743..5b654d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ RUN pnpm i RUN pnpm run build # Expose the application port -EXPOSE 8000 +EXPOSE 3002 # Start the application -CMD ["pnpm", "run", "doppler:syncdev"] +CMD ["pnpm run start"] From 8236bdfa58c3d1f05da26b7f685e5d2ef8ec6e32 Mon Sep 17 00:00:00 2001 From: Girts Popovs Date: Thu, 12 Dec 2024 12:42:39 +0200 Subject: [PATCH 3/3] update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5b654d0..fc1bc83 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,4 +21,4 @@ RUN pnpm run build EXPOSE 3002 # Start the application -CMD ["pnpm run start"] +CMD ["pnpm", "start"]