Skip to content

Commit 4a13902

Browse files
authored
Feature/add working docker file (#2)
updates to Dockerfile to make it work in aws
1 parent fd5ac6a commit 4a13902

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

Dockerfile

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
FROM node:22.11.0-slim
1+
# Base image with corepack and pnpm enabled
2+
FROM 310118226683.dkr.ecr.eu-west-1.amazonaws.com/node:23.3.0-slim
23

3-
# Create app directory
4-
WORKDIR /usr/src/app
4+
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
5+
# Setup doppler
6+
RUN (curl -Ls --tlsv1.2 --proto "=https" --retry 3 https://cli.doppler.com/install.sh ) | sh
57

6-
# Copy package.json and package-lock.json
7-
COPY package*.json ./
8+
# Set up pnpm environment
9+
ENV PNPM_HOME="/pnpm"
10+
ENV PATH="$PNPM_HOME:$PATH"
11+
RUN corepack enable
812

9-
# Install app dependencies
10-
RUN npm ci
11-
12-
# Bundle app source
13+
# Set working directory
14+
WORKDIR /app
1315
COPY . .
1416

15-
# Build the TypeScript files
16-
RUN npm run build
17+
RUN pnpm i
18+
RUN pnpm run build
1719

18-
# Expose port 8080
19-
EXPOSE 8080
20+
# Expose the application port
21+
EXPOSE 3002
2022

21-
# Start the app
22-
CMD npm run start
23+
# Start the application
24+
CMD ["pnpm", "start"]

0 commit comments

Comments
 (0)