### Remix Deployment Commands Source: https://context7.com/coollabsio/coolify-examples/llms.txt Standard commands for installing dependencies, building, and starting a Remix application for deployment. The `npm start` command respects the PORT environment variable. ```bash # Nixpacks / Coolify deployment npm install npm run build npm start # serves on PORT env var, default 3000 ``` -------------------------------- ### Install Dependencies Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/nestjs/README.md Run this command to install project dependencies. ```bash npm install ``` -------------------------------- ### Start Remix Production Server Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/remix/README.md After building the application, use this command to start the production server. Ensure the build output (server and client files) is correctly deployed. ```shell npm start ``` -------------------------------- ### Develop All Packages with Turbo (Package Manager) Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/turbo-t3-nextauth/README.md Start the development server for all applications and packages in the monorepo using your package manager to execute the Turbo CLI. This is an alternative to global installation. ```sh cd my-turborepo npx turbo dev yarn exec turbo dev pnpm exec turbo dev ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/flask/README.md Install all the necessary Python packages listed in the requirements.txt file. ```bash pip install -r requirements.txt ``` -------------------------------- ### Install Dependencies with Bun Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/bun/README.md Use this command to install project dependencies using Bun. ```bash bun install ``` -------------------------------- ### Run Development Server Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/turbo-nextjs/apps/web/README.md Execute this command to start the development server for the Next.js application. Open http://localhost:3000 in your browser to view the application. ```bash yarn dev ``` -------------------------------- ### Develop All Packages with Turbo (Global) Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/turbo-t3-nextauth/README.md Start the development server for all applications and packages in the monorepo using a globally installed Turbo CLI. This command is typically used for local development. ```sh cd my-turborepo turbo dev ``` -------------------------------- ### Python Flask App Setup Source: https://context7.com/coollabsio/coolify-examples/llms.txt Basic Flask application structure and requirements file. Use 'flask run' for local development. ```python from flask import Flask, render_template app = Flask(__name__) @app.route("/") def home(): return render_template("index.html") if __name__ == "__main__": app.run(debug=True) ``` ```text flask ``` -------------------------------- ### Next.js Prisma Deployment Commands Source: https://context7.com/coollabsio/coolify-examples/llms.txt Commands for deploying a Next.js application with Prisma. Includes installing dependencies, running database migrations, building the app, and starting the server. ```bash # Deploy commands npm install npx prisma migrate deploy # run migrations npm run build npm start # runs on port 3000 ``` -------------------------------- ### Run the Flask Application Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/flask/README.md Start the Flask development server. The application will be accessible at http://localhost:5000. ```bash python app.py ``` -------------------------------- ### Symfony Deployment Commands Source: https://context7.com/coollabsio/coolify-examples/llms.txt Commands for deploying a Symfony application. Includes installing dependencies, clearing cache, running migrations, and starting a development server. ```bash # Deploy composer install --no-dev --optimize-autoloader php bin/console cache:clear --env=prod php bin/console doctrine:migrations:migrate --no-interaction php -S 0.0.0.0:8000 public/index.php ``` -------------------------------- ### Develop Specific Package with Turbo (Package Manager) Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/turbo-t3-nextauth/README.md Start the development server for a specific package (e.g., 'web') within the monorepo using your package manager to execute the Turbo CLI and filters. This is an alternative to global installation. ```sh cd my-turborepo npx turbo dev --filter=web yarn exec turbo dev --filter=web pnpm exec turbo dev --filter=web ``` -------------------------------- ### Nuxt Nitro Configuration Example Source: https://context7.com/coollabsio/coolify-examples/llms.txt Example of a Nitro configuration file, specifying the source directory for the server code. This is equivalent to the `nitro.config.ts` file. ```toml # nuxt/nitro/nitro.config.ts equivalent # nitro.config.ts export default defineNitroConfig({ srcDir: "server" }) ``` -------------------------------- ### Nuxt Nitro Build and Run Commands Source: https://context7.com/coollabsio/coolify-examples/llms.txt Commands to install dependencies, build, and run a standalone Nitro server using pnpm. Includes an example `curl` command to test the health check endpoint. ```bash pnpm install pnpm build # outputs to .output/ pnpm start # node .output/server/index.mjs → port 3000 # curl http://localhost:3000/api/v1/health → "OK" ``` -------------------------------- ### Run Next.js Development Server Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/turbo-t3-nextauth/apps/docs/README.md Use one of these commands to start the development server for your Next.js project. Open http://localhost:3000 in your browser to view the application. ```bash npm run dev # or yarn dev # or pnpm dev # or bun dev ``` -------------------------------- ### Static HTML Site Example Source: https://context7.com/coollabsio/coolify-examples/llms.txt A basic HTML file serving as a static site. No build process is required, and it can be deployed directly. Includes custom index and 404 pages. ```html Laravel Meetup
It works. Really? But for real? Real real? Test 1-2-3
``` -------------------------------- ### Create and Activate Virtual Environment Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/flask/README.md Create a Python virtual environment to manage project dependencies. Activate the environment before installing packages. ```bash python3 -m venv .venv source venv/bin/activate ``` -------------------------------- ### Develop Specific Package with Turbo (Global) Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/turbo-t3-nextauth/README.md Start the development server for a specific package (e.g., 'web') within the monorepo using a globally installed Turbo CLI and filters. This allows focused development on a particular part of the monorepo. ```sh cd my-turborepo turbo dev --filter=web ``` -------------------------------- ### NestJS Controller Example Source: https://context7.com/coollabsio/coolify-examples/llms.txt A basic NestJS controller that handles GET requests to the root path and returns a greeting from `AppService`. Uses `@Controller` and `@Get` decorators. ```typescript // nestjs/src/app.controller.ts import { Controller, Get } from '@nestjs/common'; import { AppService } from './app.service'; @Controller() export class AppController { constructor(private readonly appService: AppService) {} @Get() getHello(): string { return this.appService.getHello(); } } ``` -------------------------------- ### Run Remix Dev Server Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/remix/README.md Use this command to start the development server for your Remix application. This allows for hot-reloading and other development-specific features. ```shellscript npm run dev ``` -------------------------------- ### Build All Packages with Turbo (Global) Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/turbo-t3-nextauth/README.md Build all applications and packages in the monorepo using a globally installed Turbo CLI. Recommended for faster execution. ```sh cd my-turborepo turbo build ``` -------------------------------- ### Go with Gin API Example Source: https://context7.com/coollabsio/coolify-examples/llms.txt A Go HTTP API using the Gin framework with route groups, path parameters, Basic Auth middleware, and an in-memory key/value store. Compiled to a scratch-based Docker image. ```go // go/gin/main.go package main import ( "net/http" "github.com/gin-gonic/gin" ) var db = make(map[string]string) func setupRouter() *gin.Engine { r := gin.Default() r.GET("/ping", func(c *gin.Context) { c.String(http.StatusOK, "pong") }) r.GET("/user/:name", func(c *gin.Context) { user := c.Params.ByName("name") if value, ok := db[user]; ok { c.JSON(http.StatusOK, gin.H{"user": user, "value": value}) } else { c.JSON(http.StatusOK, gin.H{"user": user, "status": "no value"}) } }) authorized := r.Group("/", gin.BasicAuth(gin.Accounts{"foo": "bar", "manu": "123"})) authorized.POST("admin", func(c *gin.Context) { user := c.MustGet(gin.AuthUserKey).(string) var json struct{ Value string `json:"value" binding:"required"` } if c.Bind(&json) == nil { db[user] = json.Value c.JSON(http.StatusOK, gin.H{"status": "ok"}) } }) return r } func main() { setupRouter().Run(":3000") } ``` ```bash # curl examples curl http://localhost:3000/ping # → pong curl http://localhost:3000/user/foo # → {"user":"foo","status":"no value"} curl -X POST http://localhost:3000/admin \ -H 'Authorization: Basic Zm9vOmJhcg==' \ -H 'Content-Type: application/json' \ -d '{"value":"bar"}' # → {"status":"ok"} ``` ```dockerfile # go/gin/Dockerfile FROM golang:1.22 as build WORKDIR /app COPY . . RUN go build -o /server . FROM scratch COPY --from=build /server /server EXPOSE 3000 CMD ["/server"] ``` -------------------------------- ### Custom Docker Compose Start Command Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/docker-compose-preserve-repo-env/README.md This command is used in Coolify's advanced settings to deploy a Docker Compose application. It specifies the compose files to use and starts the services in detached mode. ```bash docker compose -f docker-compose.yaml -f docker-compose.prod.yaml up -d ``` -------------------------------- ### Strapi CMS Build and Start Commands Source: https://context7.com/coollabsio/coolify-examples/llms.txt Environment variables and commands required to build and start a Strapi CMS application. The application exposes port 1337. ```bash # Required env vars (from .env.example) HOST=0.0.0.0 PORT=1337 APP_KEYS="key1,key2" API_TOKEN_SALT=random ADMIN_JWT_SECRET=random JWT_SECRET=random npm run build npm start # → http://localhost:1337/admin ``` -------------------------------- ### Docker Compose: Multi-Service with Build Args and Env Vars Source: https://context7.com/coollabsio/coolify-examples/llms.txt Demonstrates a multi-service Docker Compose setup including custom builds with arguments and Coolify's SERVICE_FQDN/PASSWORD variable substitution. ```yaml # docker-compose/docker-compose.yaml services: api.test: build: context: . dockerfile: Dockerfile args: TEST: "${TEST}" ports: - "3000" environment: - FQDN=${SERVICE_FQDN_API} - PORT=3000 - TEST_PASSWORD=${SERVICE_PASSWORD_TEST} database-prod: image: postgres:14-alpine environment: - POSTGRES_DB=database - POSTGRES_PASSWORD=password ``` -------------------------------- ### Run NestJS Application Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/nestjs/README.md Commands to start the NestJS application in different modes. ```bash npm run start ``` ```bash npm run start:dev ``` ```bash npm run start:prod ``` -------------------------------- ### NestJS Application Bootstrap Source: https://context7.com/coollabsio/coolify-examples/llms.txt Minimal NestJS application setup using `NestFactory` to create an application instance and listen on port 3000. Ensure `AppModule` is correctly configured. ```typescript // nestjs/src/main.ts import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; async function bootstrap() { const app = await NestFactory.create(AppModule); await app.listen(3000); } bootstrap(); ``` -------------------------------- ### Build All Packages with Turbo (Package Manager) Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/turbo-t3-nextauth/README.md Build all applications and packages in the monorepo using your package manager to execute the Turbo CLI. Useful if you don't have Turbo installed globally. ```sh cd my-turborepo npx turbo build yarn dlx turbo build pnpm exec turbo build ``` -------------------------------- ### Nixpacks Configuration for Node.js Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/nuxt/server/README.md Configure Nixpacks with a nixpacks.toml file for your Node.js application. You can specify a start command directly or via package.json. ```TOML [phases.setup] nixpkgsArchive = '51ad838b03a05b1de6f9f2a0fffecee64a9788ee' ``` -------------------------------- ### Docker Compose: Caddy Reverse Proxy with Custom Caddyfile Source: https://context7.com/coollabsio/coolify-examples/llms.txt A minimal Docker Compose setup for Caddy v2, using a custom Caddyfile for configuration. ```yaml # docker-compose-caddy/docker-compose.yaml services: caddy: image: caddy ports: - 2015:2015 volumes: - ./Caddyfile:/etc/caddy/Caddyfile ``` ```caddyfile # docker-compose-caddy/Caddyfile :2015 respond "Hello, world!" ``` -------------------------------- ### Elixir Phoenix Setup and Deployment Source: https://context7.com/coollabsio/coolify-examples/llms.txt Configuration for Elixir Phoenix project aliases and production deployment commands. Ensure environment variables like DATABASE_URL, SECRET_KEY_BASE, and PORT are set. ```elixir defp aliases do [ setup: ["deps.get", "ecto.setup", "assets.setup", "assets.build"], "ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"], "assets.deploy": ["tailwind hello --minify", "esbuild hello --minify", "phx.digest"] ] end ``` ```bash # Production deployment mix deps.get --only prod MIX_ENV=prod mix compile MIX_ENV=prod mix assets.deploy MIX_ENV=prod mix release ./_build/prod/rel/hello/bin/hello start # Set env: DATABASE_URL, SECRET_KEY_BASE, PORT ``` -------------------------------- ### T3 Stack Package.json Scripts Source: https://context7.com/coollabsio/coolify-examples/llms.txt Excerpt from package.json for a T3 Stack application, showing scripts for building, database operations, development, and starting the server. ```json // t3-app/package.json (scripts excerpt) { "scripts": { "build": "next build", "db:generate": "prisma migrate dev", "db:migrate": "prisma migrate deploy", "db:push": "prisma db push", "dev": "next dev --turbo", "postinstall": "prisma generate", "start": "next start" } } ``` -------------------------------- ### Docker Compose: CIFS/SMB Volume Mounts for Paperless-NGX Source: https://context7.com/coollabsio/coolify-examples/llms.txt An example of complex Docker Compose configuration using `type: cifs` volume drivers for mounting SMB network shares, as used by Paperless-NGX. ```yaml # docker-compose-test/docker-compose-volumes.yaml (excerpt) volumes: smb_data: driver: local driver_opts: type: cifs device: //10.10.10.11/paperless-data o: 'username=smbtest,password=smbtest,vers=3.0,uid=0,gid=0,dir_mode=0777,file_mode=0777' services: webserver: image: ghcr.io/paperless-ngx/paperless-ngx:latest volumes: - smb_data:/usr/src/paperless/data - smb_media:/usr/src/paperless/media environment: PAPERLESS_REDIS: 'redis://broker:6379' PAPERLESS_DBHOST: db PAPERLESS_URL: 'https://paperless.paperless.io' ``` -------------------------------- ### Laravel Nixpacks Configuration with Supervisor Source: https://context7.com/coollabsio/coolify-examples/llms.txt Nixpacks configuration for a Laravel application using Supervisor to manage multiple processes including nginx, PHP-FPM, and queue workers. The start script is defined in 'start.sh'. ```toml [phases.setup] nixPkgs = ["...", "python311Packages.supervisor"] [start] cmd = '/assets/start.sh' [staticAssets] "worker-laravel.conf" = ''' [program:worker-laravel] command=bash -c 'exec php /app/artisan queue:work --sleep=3 --tries=3 --max-time=3600' numprocs=12 autostart=true autorestart=true stopasgroup=true killasgroup=true ''' "worker-nginx.conf" = ''' [program:worker-nginx] command=nginx -c /etc/nginx.conf autostart=true autorestart=true ''' "worker-phpfpm.conf" = ''' [program:worker-phpfpm] command=php-fpm -y /assets/php-fpm.conf -F autostart=true autorestart=true ''' ``` -------------------------------- ### Login to Vercel for Remote Caching (Package Manager) Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/turbo-t3-nextauth/README.md Authenticate the Turborepo CLI with your Vercel account using your package manager to execute the login command. This is an alternative to global installation. ```sh cd my-turborepo npx turbo login yarn exec turbo login pnpm exec turbo login ``` -------------------------------- ### NestJS Production Build and Run Source: https://context7.com/coollabsio/coolify-examples/llms.txt Commands to build a NestJS application for production and start the server. Assumes a standard `npm run build` script compiles TypeScript to a `dist/` directory. ```bash # Build and run for production npm run build # compiles TypeScript to dist/ node dist/main # start production server on port 3000 ``` -------------------------------- ### Remix v2 package.json Scripts Source: https://context7.com/coollabsio/coolify-examples/llms.txt Defines build, development, and start scripts for a Remix v2 application using Vite. Requires Node.js version 20 or higher. ```json // remix/package.json { "scripts": { "build": "remix vite:build", "dev": "remix vite:dev", "start": "remix-serve ./build/server/index.js" }, "engines": { "node": ">=20.0.0" } } ``` -------------------------------- ### Turborepo Next.js Monorepo Dockerfile Source: https://context7.com/coollabsio/coolify-examples/llms.txt Dockerfile for a Turborepo monorepo with Next.js apps. It sets up pnpm, installs dependencies, builds the project using turbo, and prepares a standalone runner. ```dockerfile # turbo-nextjs/Dockerfile (condensed) FROM node:23-alpine AS base ENV PNPM_HOME="/pnpm" ENV PATH="$PNPM_HOME:$PATH" RUN npm install -g pnpm@10.5.2 FROM base AS builder WORKDIR /app COPY . . RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile RUN pnpm turbo build FROM base AS runner COPY --from=builder /app/apps/web/.next/standalone ./ COPY --from=builder /app/apps/web/.next/static ./apps/web/.next/static EXPOSE 3000 CMD ["node", "apps/web/server.js"] ``` -------------------------------- ### Build Specific Package with Turbo (Package Manager) Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/turbo-t3-nextauth/README.md Build a specific package (e.g., 'docs') within the monorepo using your package manager to execute the Turbo CLI and filters. This is an alternative to global installation. ```sh cd my-turborepo npx turbo build --filter=docs yarn exec turbo build --filter=docs pnpm exec turbo build --filter=docs ``` -------------------------------- ### Link Turborepo to Remote Cache (Package Manager) Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/turbo-t3-nextauth/README.md Link your Turborepo project to your Vercel remote cache using your package manager to execute the link command. This is an alternative to global installation. ```sh cd my-turborepo npx turbo link yarn exec turbo link pnpm exec turbo link ``` -------------------------------- ### Build Specific Package with Turbo (Global) Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/turbo-t3-nextauth/README.md Build a specific package (e.g., 'docs') within the monorepo using a globally installed Turbo CLI and filters. This optimizes build times by only processing the specified package and its dependencies. ```sh cd my-turborepo turbo build --filter=docs ``` -------------------------------- ### Ruby on Rails 7 Dockerfile Source: https://context7.com/coollabsio/coolify-examples/llms.txt A multi-stage Dockerfile for a Rails 7.1 application using SQLite3 and Puma. It installs dependencies, precompiles assets, and sets up a non-root user for production. ```dockerfile ARG RUBY_VERSION=3.1.2 FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base WORKDIR /rails ENV RAILS_ENV="production" BUNDLE_DEPLOYMENT="1" BUNDLE_PATH="/usr/local/bundle" FROM base as build RUN apt-get update -qq && apt-get install --no-install-recommends -y build-essential git libvips pkg-config COPY Gemfile Gemfile.lock ./ RUN bundle install COPY . . RUN bundle exec bootsnap precompile app/ lib/ RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile FROM base RUN apt-get update -qq && apt-get install --no-install-recommends -y curl libsqlite3-0 libvips COPY --from=build /usr/local/bundle /usr/local/bundle COPY --from=build /rails /rails RUN useradd rails --create-home --shell /bin/bash && chown -R rails:rails db log storage tmp USER rails:rails ENTRYPOINT ["/rails/bin/docker-entrypoint"] EXPOSE 3000 CMD ["./bin/rails", "server"] ``` -------------------------------- ### Vue.js SSR Package JSON Configuration Source: https://context7.com/coollabsio/coolify-examples/llms.txt Package.json for a Vue 3 SSR application using Express. Defines the start script to run the server and lists core dependencies. ```json // vue/ssr/package.json { "scripts": { "start": "node src/server.js" }, "dependencies": { "express": "^4.17.2", "vue": "^3.4.29" } } ``` -------------------------------- ### Nuxt 4 SSR Server Configuration Source: https://context7.com/coollabsio/coolify-examples/llms.txt Basic Nuxt 4 configuration for server-side rendering (SSR). Includes compatibility date and devtools enablement. The `start` script in `package.json` runs the compiled Nitro server. ```typescript // nuxt/server/nuxt.config.ts export default defineNuxtConfig({ compatibilityDate: '2025-07-15', devtools: { enabled: true } }); ``` -------------------------------- ### Shopware 6 Docker Compose Configuration Source: https://context7.com/coollabsio/coolify-examples/llms.txt Docker Compose setup for Shopware 6, including web server, workers, database (MariaDB), and cache (Valkey/Redis). Configures environment variables for database and session handling. ```yaml # shopware6/docker-compose.yaml services: web: image: shopware6 build: { context: . } environment: APP_ENV: "${APP_ENV:-prod}" DATABASE_URL: "${DATABASE_URL:-mysql://shopware:shopware@database/shopware}" APP_URL: "${APP_URL:-$SERVICE_URL_WEB}" PHP_SESSION_HANDLER: "${PHP_SESSION_HANDLER:-redis}" PHP_SESSION_SAVE_PATH: "${PHP_SESSION_SAVE_PATH:-tcp://cache:6379/1}" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/api/_info/health-check"] interval: 30s worker-1: &worker image: shopware6 entrypoint: ["php", "bin/console", "messenger:consume", "async", "low_priority", "--time-limit=300", "--memory-limit=512M"] scheduled-task: image: shopware6 entrypoint: ["php", "bin/console", "scheduled-task:run"] database: image: mariadb:11.4 environment: MARIADB_DATABASE: shopware MARIADB_USER: shopware MARIADB_PASSWORD: shopware cache: image: valkey/valkey:latest ``` -------------------------------- ### Docker Compose: Preserve Repository Env Bug Reproducer Source: https://context7.com/coollabsio/coolify-examples/llms.txt Reproduces an issue with Coolify's '--project-directory' path resolution when 'Preserve Repository' is enabled with custom Docker Compose start commands. ```yaml # docker-compose-preserve-repo-env/docker-compose.yaml services: web: image: nginx:alpine ports: - "${WEB_PORT:-8080}:80" ``` ```yaml # docker-compose-preserve-repo-env/docker-compose.prod.yaml services: web: restart: always ``` ```bash # Expected start command in Coolify (Advanced settings): docker compose -f docker-compose.yaml -f docker-compose.prod.yaml up -d # Env var: WEB_PORT=9090 ``` -------------------------------- ### Initialize Turborepo Project Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/turbo-t3-nextauth/README.md Use this command to create a new Turborepo project. It sets up the basic monorepo structure. ```sh npx create-turbo@latest ``` -------------------------------- ### Build Remix App for Production Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/remix/README.md Execute this command to create a production-ready build of your Remix application. This optimizes the code for deployment. ```shell npm run build ``` -------------------------------- ### Docker Compose: Bind Mount Preview Deployment Bug Reproducer Source: https://context7.com/coollabsio/coolify-examples/llms.txt Demonstrates how bind mounts from repository content fail in Preview Deployments due to Coolify incorrectly appending '-pr-N' to source paths. ```yaml # docker-compose-bind-mount-preview/docker-compose.yaml services: nginx: image: nginx:alpine ports: ["0:80"] volumes: - ./static:/var/www/static:ro depends_on: [web] web: image: alpine:latest command: ["sh", "-c", "echo 'hello' > /var/www/static/index.html && sleep infinity"] volumes: - ./static:/var/www/static ``` -------------------------------- ### Astro Static Site Configuration Source: https://context7.com/coollabsio/coolify-examples/llms.txt Configure Astro for static site generation. Build output goes to /dist and can be served by any static file host. ```javascript // astro/static/astro.config.mjs import { defineConfig } from 'astro/config'; export default defineConfig({ output: 'static' }); ``` ```bash # Coolify: Use Nixpacks # Enable "Is it a static site?" # Set Publish Directory to /dist npm run build # outputs to dist/ ``` -------------------------------- ### Bun HTTP Server with Path Routing Source: https://context7.com/coollabsio/coolify-examples/llms.txt A minimal Bun-native HTTP server using Bun.serve() with path-based routing. The PORT environment variable is respected. Deployable via the included Dockerfile. ```typescript // bun/index.ts const PORT = process.env.PORT || 3000; Bun.serve({ port: PORT, fetch(req) { const url = new URL(req.url); if (url.pathname === "/") return new Response("Home page!"); if (url.pathname === "/blog") return new Response("Blog!"); if (url.pathname === "/about") return new Response("About!"); if (url.pathname === "/201") return new Response("201", { status: 201 }); if (url.pathname === "/202") return new Response("202", { status: 202 }); return new Response("404!"); }, }); console.log(`Server running at http://localhost:${PORT}`); ``` ```dockerfile # bun/Dockerfile FROM oven/bun:1.1.45-alpine AS base RUN apk add --no-cache git wget WORKDIR /app COPY package.json bun.lockb ./ RUN bun install --frozen-lockfile COPY . . FROM base AS release USER bun EXPOSE 3000/tcp ENTRYPOINT [ "bun", "run", "index.ts" ] ``` -------------------------------- ### Clone Flask Minimal Repository Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/flask/README.md Clone the Flask minimal starter project from GitHub. Navigate into the cloned directory. ```bash git clone https://github.com/yourusername/flask-minimal.git cd flask-minimal ``` -------------------------------- ### Configure Application Metadata with coolify.json Source: https://context7.com/coollabsio/coolify-examples/llms.txt Define build system, commands, exposed ports, and environment variables for Coolify deployments. Uses auto-generation helpers for sensitive variables. ```json // coolify.json (root or per-project) { "version": "1.0", "name": "test-app", "build": { "type": "nixpacks", "install_command": "npm install", "build_command": "npm run build", "start_command": "npm start" }, "domains": { "ports_exposes": "3000" }, "environment_variables": { "production": [ { "key": "DB_PASSWORD", "value": "SERVICE_PASSWORD_64" }, { "key": "APP_SECRET", "value": "SERVICE_BASE64_32" } ] } } ``` -------------------------------- ### Run a Script with Bun Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/bun/README.md Execute a TypeScript file using the Bun runtime. ```bash bun run index.ts ``` -------------------------------- ### Vite Build Command for Static Deployment Source: https://context7.com/coollabsio/coolify-examples/llms.txt Command to build a Vite project for static deployment. The output is typically placed in a 'dist/' directory, which can be configured in Coolify. ```bash npm run build # outputs to dist/ # Coolify: "Is it a static site?" = ON, Publish Directory = /dist ``` -------------------------------- ### Docker Compose: Environment Variable Fallback in Volume Mounts Source: https://context7.com/coollabsio/coolify-examples/llms.txt Illustrates using environment variable fallback syntax (${VAR:-default}) for configurable bind-mount source paths in Docker Compose. ```yaml # docker-compose-env-var-fallback-volume/docker-compose.yaml services: web: image: nginx:alpine volumes: - type: bind source: '${CONFIG_FILE:-./default-config.yaml}' target: /etc/nginx/conf.d/custom.conf read_only: true ``` -------------------------------- ### Static Nuxt Dockerfile Source: https://context7.com/coollabsio/coolify-examples/llms.txt Dockerfile for deploying a statically generated Nuxt application. It builds the site using `npm run generate` and then serves the output using Nginx. Assumes the output is in `.output/public`. ```dockerfile # Dockerfile for static nuxt (from README) FROM node:24 AS build WORKDIR /app COPY package.json package-lock.json* ./ RUN npm ci COPY . . RUN npm run generate FROM nginx COPY --from=build /app/.output/public /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] ``` -------------------------------- ### Dockerfile for Nuxt.js Static Site Build Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/nuxt/static/README.md Use this Dockerfile to build a Nuxt.js application for static deployment. It first builds the application using npm and then serves the output with Nginx. ```docker FROM node:24 AS build WORKDIR /app COPY package.json package-lock.json* ./ RUN npm ci COPY . . RUN npm run generate FROM nginx COPY --from=build /app/.output/public /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] ``` -------------------------------- ### Shopware 6 Dockerfile for Custom Image Source: https://context7.com/coollabsio/coolify-examples/llms.txt Dockerfile for building a custom Shopware 6 image. It uses a base image and the Shopware CLI to build the project, then copies the built artifacts. ```dockerfile # shopware6/Dockerfile ARG BASE_IMAGE=shopware/docker-base:8.3 FROM shopware/docker-base:8.3 as base-image FROM ghcr.io/shopware/shopware-cli:latest-php-8.3 AS build ADD . /src WORKDIR /src RUN /usr/local/bin/entrypoint.sh shopware-cli project ci /src FROM base-image COPY --from=build --chown=82 /src /var/www/html EXPOSE 8000 ``` -------------------------------- ### Dockerfile for Node.js Application Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/nuxt/server/README.md Use this Dockerfile for building a Node.js application with Coolify. Ensure the exposed port matches your application's port. ```Dockerfile 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"] ``` -------------------------------- ### Vite Vanilla JS Project Scripts Source: https://context7.com/coollabsio/coolify-examples/llms.txt Package.json scripts for a Vite project using vanilla JavaScript. Includes commands for development, building, and previewing the application. ```json // vite/vanilla-js/package.json { "scripts": { "dev": "vite", "build": "vite build", "preview": "vite preview" }, "devDependencies": { "vite": "^5.3.4" } } ``` -------------------------------- ### Flask (Python) Application Source: https://context7.com/coollabsio/coolify-examples/llms.txt A minimal Flask application with Jinja2 templating, CSS, and JavaScript. Deployable via Nixpacks (auto-detected Python). ```python ``` -------------------------------- ### Rust with Rocket Web Application Source: https://context7.com/coollabsio/coolify-examples/llms.txt A Rust web application using the Rocket framework with various route handlers including path parameters, query parameters, and multilingual responses. ```rust // rust/src/main.rs #[macro_use] extern crate rocket; #[get("/world")] fn world() -> &'static str { "Hello, world!" } #[get("//")] fn wave(name: &str, age: u8) -> String { format!("👋 Hello, {} year old named {}!", age, name) } #[get("/?&")] fn hello(lang: Option, opt: Options<'_>) -> String { // Returns greeting based on lang (en/ru) and optional emoji/name params // ... } #[launch] fn rocket() -> _ { rocket::build() .mount("/", routes![hello]) .mount("/hello", routes![world, mir]) .mount("/wave", routes![wave]) } ``` ```bash # Test endpoints curl "http://localhost:8000/hello/world" # → Hello, world! curl "http://localhost:8000/wave/Rocketeer/100" # → 👋 Hello, 100 year old named Rocketeer! curl "http://localhost:8000/?name=Alice&lang=en&emoji" # → 👋 Hello, Alice! curl "http://localhost:8000/?lang=ru" # → Привет! ``` -------------------------------- ### Turborepo Configuration for Monorepo Tasks Source: https://context7.com/coollabsio/coolify-examples/llms.txt Configuration file for Turborepo, defining build and lint tasks with dependencies and output caching. The 'dev' task is configured for persistent, non-cached execution. ```json // turbo-nextjs/turbo.json { "$schema": "https://turbo.build/schema.json", "tasks": { "build": { "dependsOn": ["^build"], "outputs": [".next/**", "!.next/cache/**"] }, "lint": { "dependsOn": ["^lint"] }, "dev": { "cache": false, "persistent": true } } } ``` -------------------------------- ### Run NestJS Tests Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/nestjs/README.md Commands to execute unit tests, end-to-end tests, and check test coverage. ```bash npm run test ``` ```bash npm run test:e2e ``` ```bash npm run test:cov ``` -------------------------------- ### Nuxt 4 Static Site Generation Configuration Source: https://context7.com/coollabsio/coolify-examples/llms.txt Nuxt 4 configuration for static site generation (SSG) using Nitro prerendering. Enables crawling links and specifies initial routes. Includes runtime config for an application URL. ```typescript // nuxt/static/nuxt.config.ts export default defineNuxtConfig({ compatibilityDate: "2025-07-15", devtools: { enabled: true }, nitro: { prerender: { crawlLinks: true, routes: ["/"], }, }, runtimeConfig: { public: { appUrl: process.env.APP_URL || "something", }, }, }); ``` -------------------------------- ### Docker Compose: Environment Variable Deep Parsing Source: https://context7.com/coollabsio/coolify-examples/llms.txt Tests Coolify's Docker Compose parser with nested environment variable interpolation, including fallback syntax like `${VAR:-${OTHER_VAR}/path}`. ```yaml # docker-compose/docker-compose-deep-parse.yaml services: yolo: image: nginx environment: FOO_BAR: '123' API: '${API_URL:-${SERVICE_URL_YOLO}/api}' ``` -------------------------------- ### Login to Vercel for Remote Caching (Global) Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/turbo-t3-nextauth/README.md Authenticate the Turborepo CLI with your Vercel account to enable remote caching. This command is required before linking your Turborepo to the remote cache. ```sh cd my-turborepo turbo login ``` -------------------------------- ### Configure Strapi Database Connection Source: https://context7.com/coollabsio/coolify-examples/llms.txt Defines database connection settings for Strapi CMS, supporting SQLite and PostgreSQL. Ensure environment variables are set for the chosen client. ```javascript // strapi/config/database.js module.exports = ({ env }) => { const client = env('DATABASE_CLIENT', 'sqlite'); const connections = { sqlite: { connection: { filename: path.join(__dirname, '..', env('DATABASE_FILENAME', '.tmp/data.db')) }, useNullAsDefault: true, }, postgres: { connection: { connectionString: env('DATABASE_URL'), host: env('DATABASE_HOST', 'localhost'), port: env.int('DATABASE_PORT', 5432), database: env('DATABASE_NAME', 'strapi'), user: env('DATABASE_USERNAME', 'strapi'), password: env('DATABASE_PASSWORD', 'strapi'), }, }, }; return { connection: { client, ...connections[client] } }; }; ``` -------------------------------- ### tRPC API Route Handler for Next.js Source: https://context7.com/coollabsio/coolify-examples/llms.txt Sets up a tRPC API endpoint using `@trpc/server/adapters/fetch` for a Next.js application. Requires `appRouter` and `createTRPCContext` to be defined. ```typescript // t3-nextauth/src/app/api/trpc/[trpc]/route.ts import { fetchRequestHandler } from "@trpc/server/adapters/fetch"; import { appRouter } from "~/server/api/root"; import { createTRPCContext } from "~/server/api/trpc"; const handler = (req: Request) => fetchRequestHandler({ endpoint: "/api/trpc", req, router: appRouter, createContext: () => createTRPCContext({ headers: req.headers }), }); export { handler as GET, handler as POST }; ``` -------------------------------- ### Link Turborepo to Remote Cache (Global) Source: https://github.com/coollabsio/coolify-examples/blob/v4.x/turbo-t3-nextauth/README.md Link your Turborepo project to your Vercel remote cache. This command enables sharing of build artifacts across machines and CI/CD pipelines. ```sh cd my-turborepo turbo link ``` -------------------------------- ### Next.js SSR Dockerfile Source: https://context7.com/coollabsio/coolify-examples/llms.txt Dockerfile for a Next.js application configured for Server-Side Rendering (SSR). It builds the application and sets up a production environment. ```dockerfile FROM node:18-alpine AS base FROM base AS deps RUN apk add --no-cache libc6-compat WORKDIR /app COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ RUN npm ci FROM base AS builder WORKDIR /app COPY --from=deps /app/node_modules ./ COPY . . ENV NEXT_TELEMETRY_DISABLED 1 RUN npm run build FROM base AS runner WORKDIR /app ENV NODE_ENV production RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs COPY --from=builder /app/public ./ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone . COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static USER nextjs EXPOSE 3000 ENV PORT 3000 CMD HOSTNAME="0.0.0.0" node server.js ``` -------------------------------- ### Nuxt 4 SSR Dockerfile Source: https://context7.com/coollabsio/coolify-examples/llms.txt Dockerfile for building and running a Nuxt 4 SSR application. It uses a multi-stage build, first compiling the app and then copying the output to a minimal Node.js image. Sets PORT, HOST, and exposes port 3000. ```dockerfile # Dockerfile approach (from README) 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"] ``` -------------------------------- ### Laravel Pure (Inertia + Vue 3 + Tailwind v4) package.json Source: https://context7.com/coollabsio/coolify-examples/llms.txt Dependencies for a Laravel application using Inertia.js with Vue 3, Vite, and Tailwind CSS v4. Features Reka UI and a newer laravel-vite-plugin. ```json { "dependencies": { "@inertiajs/vue3": "^2.1.0", "reka-ui": "^2.4.1", "tailwindcss": "^4.1.1", "laravel-vite-plugin": "^2.0.0", "vue": "^3.5.13" } } ``` -------------------------------- ### Astro SSR (Node.js Adapter) Configuration Source: https://context7.com/coollabsio/coolify-examples/llms.txt Configure Astro for Server-Side Rendering using the Node.js adapter in standalone mode. Exposes port 4321. ```javascript // astro/server/astro.config.mjs import { defineConfig } from 'astro/config'; import node from "@astrojs/node"; export default defineConfig({ output: 'server', adapter: node({ mode: "standalone" }) }); ``` ```bash # Coolify: Use Nixpacks, set Ports Exposed to 4321 # Start Command: HOST=0.0.0.0 node dist/server/entry.mjs ``` -------------------------------- ### Next.js SPA Image Optimization Configuration Source: https://context7.com/coollabsio/coolify-examples/llms.txt Configuration for a Next.js SPA to use a custom image loader for optimization. It specifies the output format and the custom loader file. ```javascript // nextjs/spa-with-image-optimization/next.config.mjs const nextConfig = { output: 'export', images: { loader: 'custom', loaderFile: './loader.js', }, }; export default nextConfig; ``` -------------------------------- ### Next.js SPA Static Export Dockerfile Source: https://context7.com/coollabsio/coolify-examples/llms.txt Dockerfile for a Next.js Single Page Application (SPA) using static export. It builds the static assets and serves them using a Node.js standalone server. ```dockerfile # nextjs/spa/Dockerfile (condensed) FROM node:25-alpine AS base FROM base AS builder WORKDIR /app COPY --from=deps /app/node_modules ./ COPY . . ARG COOLIFY_URL ENV NEXT_PUBLIC_BASE_URL=${COOLIFY_URL} ENV NEXT_TELEMETRY_DISABLED=1 ENV NEXT_PRIVATE_STANDALONE=true RUN yarn build FROM base AS runner COPY --from=builder /app/public ./ COPY --from=builder --chown=nextjs:nodejs /app/out . EXPOSE 3000 CMD ["node", "server.js"] ``` -------------------------------- ### AdonisJS Routes and Scripts Source: https://context7.com/coollabsio/coolify-examples/llms.txt Defines a simple home route and provides package.json scripts for building and running an AdonisJS application. ```typescript // adonisjs/simple/start/routes.ts import router from '@adonisjs/core/services/router'; router.on('/').render('pages/home'); ``` ```json // adonisjs/simple/package.json (scripts) { "scripts": { "start": "node bin/server.js", "build": "node ace build", "dev": "node ace serve --hmr" } } ``` ```bash npm install node ace build # compiles TypeScript → build/ node bin/server.js # production server on PORT (default 3000) ``` -------------------------------- ### T3 Stack Next.js Configuration Source: https://context7.com/coollabsio/coolify-examples/llms.txt Next.js configuration for a T3 Stack application, specifying 'output: "standalone"' for containerized deployment and importing environment variable validation. ```javascript // t3-app/next.config.js import "./src/env.js"; // validates env vars with Zod at startup const config = { output: 'standalone' }; export default config; ```