Files
solelog/apps/api/Dockerfile
Bas van Rossem eae9a53a26
All checks were successful
Build and Push Docker Image / build (push) Successful in 37s
fix(docker): drop COPY .yarn/ — dir is gitignored, absent in CI builds
2026-06-17 20:45:53 +02:00

22 lines
545 B
Docker

FROM node:22-alpine AS base
RUN corepack enable
WORKDIR /repo
# Copy workspace manifests for cached install
COPY package.json yarn.lock .yarnrc.yml ./
COPY packages/shared/package.json ./packages/shared/package.json
COPY apps/api/package.json ./apps/api/package.json
RUN yarn workspaces focus @solelog/api
# Copy sources
COPY packages/shared/ ./packages/shared/
COPY apps/api/ ./apps/api/
WORKDIR /repo/apps/api
ENV NODE_ENV=production
EXPOSE 3000
# Apply migrations, then start the server
CMD ["sh", "-c", "yarn db:migrate && yarn start"]