mirror of
https://github.com/dokploy/dokploy.git
synced 2026-06-14 03:19:49 +00:00
9e89edf167
Update to latest stable versions: - pnpm: 9.12.0 → 10.26.0 - Docker: 28.5.0/28.5.2 → 29.1.3 - Nixpacks: 1.39.0 → 1.41.0 - Railpack: 0.2.2/0.15.0 → 0.15.1 - buildpacks/pack: 0.35.0 → 0.39.1 Files updated: - All Dockerfiles (main, schedule, cloud, server) - All package.json files (root, server, api, schedules, dokploy) - GitHub workflow (pull-request.yml) - Server setup script - Database schema and DBML files - Test fixtures - UI components
38 lines
1.0 KiB
Docker
38 lines
1.0 KiB
Docker
# syntax=docker/dockerfile:1
|
|
FROM node:20.16.0-slim AS base
|
|
ENV PNPM_HOME="/pnpm"
|
|
ENV PATH="$PNPM_HOME:$PATH"
|
|
RUN corepack enable
|
|
RUN corepack prepare pnpm@10.26.0 --activate
|
|
|
|
FROM base AS build
|
|
COPY . /usr/src/app
|
|
WORKDIR /usr/src/app
|
|
|
|
RUN apt-get update && apt-get install -y python3 make g++ git python3-pip pkg-config libsecret-1-dev && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install dependencies
|
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm --filter=@dokploy/server --filter=./apps/api install --frozen-lockfile
|
|
|
|
# Deploy only the dokploy app
|
|
|
|
ENV NODE_ENV=production
|
|
RUN pnpm --filter=@dokploy/server build
|
|
RUN pnpm --filter=./apps/api run build
|
|
|
|
RUN pnpm --filter=./apps/api --prod deploy /prod/api
|
|
|
|
RUN cp -R /usr/src/app/apps/api/dist /prod/api/dist
|
|
|
|
FROM base AS dokploy
|
|
WORKDIR /app
|
|
|
|
# Set production
|
|
ENV NODE_ENV=production
|
|
|
|
# Copy only the necessary files
|
|
COPY --from=build /prod/api/dist ./dist
|
|
COPY --from=build /prod/api/package.json ./package.json
|
|
COPY --from=build /prod/api/node_modules ./node_modules
|
|
|
|
CMD HOSTNAME=0.0.0.0 && pnpm start |