mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
* feat: add schema for registry and routes * feat: add docker registry upload * feat: add show cluster * refactor: set the registry url in image in case we have a registry asociated * feat: add update registry and fix the docker url markup * chore: remove --advertise-ip on swarm script * refactor: remove listen address of swarm initialize * feat: add table to show nodes and add dropdown to add manager & workers * refactor: improve interface for cluster * refactor: improve UI * feat: add experimental swarm settings * refactor: remove comments * refactor: prettify json of each setting * refactor: add interface tooltip * refactor: delete static form self registry * refactor: allow to se a empty registry * fix: remove text area warnings * feat: add network swarm json * refactor: update ui * revert: go back to swarm init config * refactor: remove initialization on server, only on setup script * Update LICENSE.MD * feat: appearance theme support system config * refactor: remove logs * fix(README-ru): hyperlink-ed docs url * feat: (#107) webhook listener filter docker events based on image tag. Fixes #107 * refactor: simplify comparison docker tags * refactor: remove return in res status * refactor: prevent to updates download automatically * feat: support code editor (#105) * feat: support code editor * Update codeblock * refactor: remove unused class --------- Co-authored-by: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> * fix: select the right image from sourcetype (#109) * chore: bump minor version --------- Co-authored-by: hehehai <riverhohai@gmail.com> Co-authored-by: Bayram Tagiev <bayram.tagiev.a@gmail.com> Co-authored-by: Paulo Santana <30875229+hikinine@users.noreply.github.com>
64 lines
1.9 KiB
Docker
64 lines
1.9 KiB
Docker
# Etapa 1: Prepare image for building
|
|
FROM node:18-slim AS base
|
|
|
|
# Install dependencies
|
|
ENV PNPM_HOME="/pnpm"
|
|
ENV PATH="$PNPM_HOME:$PATH"
|
|
RUN corepack enable && apt-get update && apt-get install -y python3 make g++ git && rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy package.json and pnpm-lock.yaml
|
|
COPY package.json pnpm-lock.yaml ./
|
|
|
|
# Install dependencies only for building
|
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
|
|
|
# Copy the rest of the source code
|
|
COPY . .
|
|
|
|
# Build the application
|
|
RUN pnpm run build
|
|
|
|
# Stage 2: Prepare image for production
|
|
FROM node:18-slim AS production
|
|
|
|
# Install dependencies only for production
|
|
ENV PNPM_HOME="/pnpm"
|
|
ENV PATH="$PNPM_HOME:$PATH"
|
|
RUN corepack enable && apt-get update && apt-get install -y curl && apt-get install -y apache2-utils && rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy the rest of the source code
|
|
COPY --from=base /app/.next ./.next
|
|
COPY --from=base /app/dist ./dist
|
|
COPY --from=base /app/next.config.mjs ./next.config.mjs
|
|
COPY --from=base /app/public ./public
|
|
COPY --from=base /app/package.json ./package.json
|
|
COPY --from=base /app/drizzle ./drizzle
|
|
COPY --from=base /app/.env.production ./.env
|
|
COPY --from=base /app/components.json ./components.json
|
|
|
|
# Install dependencies only for production
|
|
COPY package.json pnpm-lock.yaml ./
|
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
|
|
|
|
# Install docker
|
|
RUN curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh && rm get-docker.sh
|
|
|
|
# Install Nixpacks and tsx
|
|
# | VERBOSE=1 VERSION=1.21.0 bash
|
|
RUN curl -sSL https://nixpacks.com/install.sh -o install.sh \
|
|
&& chmod +x install.sh \
|
|
&& ./install.sh \
|
|
&& pnpm install -g tsx
|
|
|
|
|
|
# Install buildpacks
|
|
RUN curl -sSL "https://github.com/buildpacks/pack/releases/download/v0.32.1/pack-v0.32.1-linux.tgz" | tar -C /usr/local/bin/ --no-same-owner -xzv pack
|
|
|
|
# Expose port
|
|
EXPOSE 3000
|
|
|
|
CMD ["pnpm", "start"] |