---
title: "Build packs"
description: "Compare OnePloy build packs: Railpack, Nixpacks, Static, Dockerfile and Docker Compose, and learn when to use each one for your app."
url: https://oneploy.dev/docs/applications/build-packs/
type: op_doc
published: 2026-11-02T19:09:47+00:00
updated: 2026-11-02T19:11:22+00:00
author: "admin"
language: en-US
---

# Build packs

> Compare OnePloy build packs: Railpack, Nixpacks, Static, Dockerfile and Docker Compose, and learn when to use each one for your app.

A build pack decides how OnePloy turns your source code into a container image. Pick **Railpack** or **Nixpacks** for automatic detection, **Dockerfile** when you control the image, **Docker Compose** for multi-container apps, and **Static** for plain HTML or prebuilt assets.

## Which build pack should I choose?

| Build pack | Best for | What you provide |
| --- | --- | --- |
| Railpack | Most web apps in common languages, with zero configuration | Source code. Commands are detected and can be overridden. |
| Nixpacks | Same use case as Railpack, using Nixpacks detection | Source code. Commands are detected and can be overridden. |
| Static | Plain HTML, CSS and JavaScript, or already-built assets | A directory of files to serve. |
| Dockerfile | Full control over the image | A `Dockerfile` in the repository. |
| Docker Compose | Several containers deployed together from Git | A Compose file in the repository. |

If you do not need a build at all, add a **Docker Image** resource instead and point it at an image in any registry.

## Railpack and Nixpacks

Both analyse the repository, detect the language and framework, and generate an image. You can override the detected behaviour in the application’s general settings:

- **Install command**, **Build command** and **Start command**
- **Base directory** for monorepos, so only a subfolder is built
- **Ports exposes**, the port your app listens on

### How do I deploy a static site with Railpack or Nixpacks?

Set **Site type** to **Static** (or **SPA** for single-page apps that need client-side routing) and set the **Publish directory**, for example `dist` or `build`. OnePloy runs your build and serves the output with an `nginx:alpine` web server.

## Static

Use the Static build pack when the repository already contains the files to serve. Set the base directory and publish directory, and OnePloy serves them with `nginx:alpine`. You can generate a default nginx configuration for static or SPA routing from the settings page.

## Dockerfile

OnePloy builds the `Dockerfile` found at the **Dockerfile location** (default is the repository root). You can also set a **Docker build stage target** for multi-stage builds, and pass build arguments through [build-time environment variables](https://oneploy.dev/docs/applications/environment-variables/).

To build from a Dockerfile without a repository, add a **Dockerfile** resource and paste the file contents.

## Docker Compose

OnePloy reads the Compose file at the **Docker compose location** and deploys every service in it. Domains are assigned per service on the Domains page. See [Custom Docker Compose](https://oneploy.dev/docs/services/custom-docker-compose/) for the variables OnePloy injects into Compose files.

## Can I change the build pack later?

Yes. Change it in the application’s general settings and redeploy. Check the ports and commands afterwards, because each build pack uses different defaults.

**Tip:** If a build is slow, check that **Build cache** is enabled in the advanced settings, and use **Watch paths** so pushes that only touch unrelated folders do not trigger a deployment.

---

Source: https://oneploy.dev/docs/applications/build-packs/ · OnePloy
