diff --git a/Dockerfile b/Dockerfile index 6ff35f3b62..fc257405f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,20 @@ FROM node:22-bookworm +# Install socat to forward traffic safely inside the container +RUN apt-get update && apt-get install -y socat && rm -rf /var/lib/apt/lists/* + WORKDIR /app -# Enable pnpm automatically +# Enable pnpm RUN corepack enable && corepack prepare pnpm@latest --activate -# Copy repository source code +# Copy code and build COPY . . - -# Install dependencies and build RUN pnpm install RUN pnpm run build EXPOSE 3080 -# Force 0.0.0.0 host binding and disable browser popups -CMD ["node", "--import", "tsx/esm", "apps/cli/src/bin.ts", "web", "--host", "0.0.0.0", "--no-open"] \ No newline at end of file +# Forward Dokploy traffic (3080) to app loopback (3081) +CMD socat TCP-LISTEN:3080,fork,reuseaddr TCP:127.0.0.1:3081 & \ + node --import tsx/esm apps/cli/src/bin.ts web --port 3081 --no-open \ No newline at end of file