mirror of
https://github.com/coollabsio/coolify-examples.git
synced 2026-02-18 21:38:58 +00:00
Coolify Configuration
Dockerfile
- Create a
Dockerfilein the root of your project with the following content:
FROM node:24 AS build
WORKDIR /app
COPY package.json package-lock.json\* ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:24
WORKDIR /app
COPY --from=build /app/.output/ ./
ENV PORT=3000
ENV HOST=0.0.0.0
EXPOSE 3000
CMD ["node", "/app/server/index.mjs"]
- Select
Dockerfileas theBuild Packin Coolify. - Set
Ports Exposedto3000(or any port you set). - Set
Dockerfile Locationto the location of yourDockerfile(e.g.,/Dockerfile).
Nixpacks
- Create a
nixpacks.tomlfile in the root of your project with the following content:
[phases.setup]
nixpkgsArchive = '51ad838b03a05b1de6f9f2a0fffecee64a9788ee'
- Select
Nixpacksas theBuild Packin Coolify. - Set
Ports Exposedto3000(or any port you set). - Set
Start Commandtonode .output/server/index.mjs- Alternatively, you can set the
startscript insidepackage.jsontonode .output/server/index.mjs. Then Nixpacks will automatically use it as the start command.
- Alternatively, you can set the