Skip to content

Feature/add working docker file #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 3002

# Start the app
CMD npm run start
# Start the application
CMD ["pnpm", "start"]
Loading