Remade dockerfile #48

Merged
LucidKobold merged 7 commits from dockerfile into main 2025-06-20 17:10:24 -04:00
Showing only changes of commit 76305376b6 - Show all commits

View File

@@ -7,12 +7,10 @@ RUN corepack enable
RUN yarn set version stable RUN yarn set version stable
# Create app directory # Create app directory
WORKDIR /usr/src WORKDIR /app
FROM base AS builder # Files required by yarn install
COPY package.json yarn.lock ./
# Files required by npm install
COPY package*.json ./
# Install app dependencies # Install app dependencies
RUN yarn install RUN yarn install
@@ -25,18 +23,14 @@ RUN yarn typecheck
FROM base AS runner FROM base AS runner
# Files required by npm install # Bundle app source
COPY package.json yarn.lock ./ COPY . .
# Install only production app dependencies # Install only production app dependencies
RUN yarn install --frozen-lockfile RUN yarn install --frozen-lockfile
# Bundle app source
COPY . .
USER node USER node
# Start the app # Start the app
EXPOSE 80 EXPOSE 80
CMD ["yarn", "start"] CMD ["yarn", "start"]
# CMD ["node", "--import", "tsx", "./src/main.ts"]