You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/builds/introduction.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,37 +7,37 @@ description: Deploy applications as Docker containers with Coolify using build p
7
7
8
8
<br />
9
9
10
-
Coolify deploys all applications as Docker containers. This means your app, database, or website runs inside a container.
10
+
Coolify deploys all applications as Docker containers. This means your app, database, or website runs inside a container.
11
11
12
12
No matter what you deploy or which build pack you use, it is always run as a Docker container.
13
13
14
-
15
14
## How Docker Containers Work
16
-
-**Docker Image:** To run a container, you need a Docker image.
17
-
-**Dockerfile:** The image is built using a Dockerfile, just a file with step-by-step instructions to build the docker image.
18
-
-**Build Process:** If you're building your own application, you'll need to create your docker image using a Dockerfile.
19
-
- Coolify helps with this build process by letting you use different build packs. A commonly used build pack is [Nixpacks ↗](https://nixpacks.com?utm_source=coolify.io), which automatically prepares a Dockerfile and builds the docker image for you.
20
15
16
+
-**Docker Image:** To run a container, you need a Docker image.
17
+
-**Dockerfile:** The image is built using a Dockerfile, just a file with step-by-step instructions to build the docker image.
18
+
-**Build Process:** If you're building your own application, you'll need to create your docker image using a Dockerfile.
19
+
- Coolify helps with this build process by letting you use different build packs. A commonly used build pack is [Nixpacks](https://nixpacks.com?utm_source=coolify.io), which automatically prepares a Dockerfile and builds the docker image for you.
21
20
22
21
## Build Packs in Coolify
23
-
Coolify offers build packs like [Nixpack ↗](https://nixpacks.com?utm_source=coolify.io) and **Static Build Pack** that automatically create your Docker image.
24
22
25
-
If you need more control over the process, you can write your own Dockerfile and Docker Compose file. In that case, Coolify will use your file to build the image on the server and deploy it as a container.
23
+
Coolify offers build packs like [Nixpack](https://nixpacks.com?utm_source=coolify.io)and **Static Build Pack**that automatically create your Docker image.
26
24
25
+
If you need more control over the process, you can write your own Dockerfile and Docker Compose file. In that case, Coolify will use your file to build the image on the server and deploy it as a container.
27
26
28
27
## Using Pre-built Images
29
-
If you already have a Docker image stored in a registry (for example, [Docker Hub ↗](https://hub.docker.com/?utm_source=coolify.io) or [GitHub Container Registry ↗](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry?utm_source=coolify.io)), you can use that image directly in Coolify. This means you do not have to rebuild the image on your server.
30
28
29
+
If you already have a Docker image stored in a registry (for example, [Docker Hub](https://hub.docker.com/?utm_source=coolify.io) or [GitHub Container Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry?utm_source=coolify.io)), you can use that image directly in Coolify. This means you do not have to rebuild the image on your server.
31
30
32
-
## Managing Build Resources
33
-
Building Docker images can consume a lot of resources on your server, potentially causing it to crash.
31
+
## Managing Build Resources
34
32
35
-
To reduce the load on your main server, Coolify allows you to connect additional servers to manage the build process.
33
+
Building Docker images can consume a lot of resources on your server, potentially causing it to crash.
36
34
37
-
You can set up a separate [build server ↗](/builds/servers) to handle the builds, or use external tools like [GitHub Actions ↗](https://github.com/features/actions?utm_source=coolify.io)to build your images and push them to any container registry.
35
+
To reduce the load on your main server, Coolify allows you to connect additional servers to manage the build process.
38
36
39
-
Once the images are pushed, you can easily use them on Coolify.
37
+
You can set up a separate [build server](/builds/servers) to handle the builds, or use external tools like [GitHub Actions](https://github.com/features/actions?utm_source=coolify.io) to build your images and push them to any container registry.
40
38
39
+
Once the images are pushed, you can easily use them on Coolify.
41
40
42
41
## What's Next?
42
+
43
43
Check the pages in the sidebar to learn more about build packs, build commands, and build servers.
Copy file name to clipboardExpand all lines: docs/builds/packs/docker-compose.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ On the Coolify dashboard, open your project and click the **Create New Resource*
24
24
25
25
**A.** If your Git repository is public, choose the **Public Repository** option.
26
26
27
-
**B.** If your repository is private, you can select **Github App** or **Deploy Key**. (These methods require extra configuration. You can check the guides on setting up a [Github App ↗](/knowledge-base/git/github/integration#with-github-app-recommended) or [Deploy Key ↗](/knowledge-base/git/github/integration#with-deploy-keys) if needed.)
27
+
**B.** If your repository is private, you can select **Github App** or **Deploy Key**. (These methods require extra configuration. You can check the guides on setting up a [Github App](/knowledge-base/git/github/integration#with-github-app-recommended) or [Deploy Key](/knowledge-base/git/github/integration#with-deploy-keys) if needed.)
Copy file name to clipboardExpand all lines: docs/builds/packs/dockerfile.md
+18-16Lines changed: 18 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,84 +7,86 @@ description: Build Docker images from your custom Dockerfile with Coolify suppor
7
7
8
8
<br />
9
9
10
-
Dockerfile includes step-by-step instructions to build a Docker image that Coolify uses to deploy your application or website.
10
+
Dockerfile includes step-by-step instructions to build a Docker image that Coolify uses to deploy your application or website.
11
11
12
12
The Dockerfile build pack allows you to use your own Dockerfile to deploy your application, you have complete control over how your application is built and deployed on Coolify.
13
13
14
-
15
14
## How to use Dockerfile?
15
+
16
16
### 1. Create a New Resource in Coolify
17
+
17
18
On the Coolify dashboard, open your project and click the **Create New Resource** button.
**A.** If your Git repository is public, choose the **Public Repository** option.
27
27
28
-
**B.** If your repository is private, you can select **Github App** or **Deploy Key**. (These methods require extra configuration. You can check the guides on setting up a [Github App ↗](/knowledge-base/git/github/integration#with-github-app-recommended) or [Deploy Key ↗](/knowledge-base/git/github/integration#with-deploy-keys) if needed.)
29
-
28
+
**B.** If your repository is private, you can select **Github App** or **Deploy Key**. (These methods require extra configuration. You can check the guides on setting up a [Github App](/knowledge-base/git/github/integration#with-github-app-recommended) or [Deploy Key](/knowledge-base/git/github/integration#with-deploy-keys) if needed.)
30
29
31
30
### 3. Select Your Git Repository
31
+
32
32
If you are using a public repository, paste the URL of your GitHub repository when prompted. The steps are very similar for all other options.
-**Branch:** Coolify will automatically detect the branch in your repository.
47
47
-**Base Directory:** Enter the directory that Coolify should use as the root. Use `/` if your files are at the root or specify a subfolder (like `/backend` for a monorepo).
48
48
49
49
Click on **Continue** button once you have set all the above settings to correct details.
50
50
51
-
52
51
### 6. Configure Network Settings
53
-
After clicking **Continue**, update settings like your domain and environment variables (if needed).
52
+
53
+
After clicking **Continue**, update settings like your domain and environment variables (if needed).
54
54
55
55
The important option is the port where your application runs.
56
56
Coolify sets the default port to 3000, so if your application listens on a different port, update the port number on the network section.
-**Pre-deployment:** Optionally, specify a script or command to execute in the existing container before deployment begins. This command is run with `sh -c`, so you do not need to add it manually.
72
74
-**Post-deployment:** Optionally, specify a script or command to execute in the newly built container after deployment completes. This command is also executed with `sh -c`.
73
75
74
-
75
76
## Known Issues and Solutions
77
+
76
78
::: details 1. Visiting the Application Domain Shows "No Available Server"
77
-
If you see a "No Available Server" error when visiting your website, it is likely due to the health check for your container.
79
+
If you see a "No Available Server" error when visiting your website, it is likely due to the health check for your container.
78
80
79
-
Run `docker ps` on your server terminal to check if your container is unhealthy or still starting.
81
+
Run `docker ps` on your server terminal to check if your container is unhealthy or still starting.
80
82
81
83
To resolve this, fix the issue causing the container to be unhealthy or remove the health checks.
82
84
:::
83
85
84
86
::: details 2. App only works inside the Container
85
-
If your app works when you check it with a `curl localhost` inside the container but you receive a 404 or "No Available Server" error when accessing your domain, verify the port settings.
87
+
If your app works when you check it with a `curl localhost` inside the container but you receive a 404 or "No Available Server" error when accessing your domain, verify the port settings.
86
88
87
-
Make sure that the port in the network settings matches the port where your application is listening. Also, check the startup log to ensure the application is not only listening on localhost.
89
+
Make sure that the port in the network settings matches the port where your application is listening. Also, check the startup log to ensure the application is not only listening on localhost.
Copy file name to clipboardExpand all lines: docs/builds/packs/nixpacks.md
+22-16Lines changed: 22 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,47 +14,52 @@ Nixpacks checks your git repository (also called as "**source directory**" in ni
14
14
Nixpacks can deploy both fully static websites and non-static applications. Once your repository is set up, you can use Coolify to deploy your project with ease.
15
15
16
16
## How to use Nixpacks?
17
+
17
18
On Coolify you can only use Nixpacks on git-based deployments.
18
19
19
20
### 1. Create a New Resource in Coolify
21
+
20
22
On Coolify dashboard open your project and click the **Create New Resource** button.
**A.** If your Git repository is public, choose the **Public Repository** option.
30
31
31
-
**B.** If your repository is private, you can select **Github App** or **Deploy Key**. (These methods require extra configuration. You can check the guides on setting up a [Github App ↗](/knowledge-base/git/github/integration#with-github-app-recommended) or [Deploy Key ↗](/knowledge-base/git/github/integration#with-deploy-keys) if needed.)
32
-
32
+
**B.** If your repository is private, you can select **Github App** or **Deploy Key**. (These methods require extra configuration. You can check the guides on setting up a [Github App](/knowledge-base/git/github/integration#with-github-app-recommended) or [Deploy Key](/knowledge-base/git/github/integration#with-deploy-keys) if needed.)
33
33
34
34
### 3. Select Your Git Repository
35
+
35
36
If you are using a public repository, paste the URL of your GitHub repository when prompted. The steps are very similar for all other options.
We have different options like Base Directory, Publish Directory, and Ports that slightly change based on the application you deploy (static websites/applications). So, below we have two sections for the deployments possible with Nixpacks.
49
+
47
50
-[How to deploy Fully Static Websites](#how-to-deploy-fully-static-website)
48
51
-[How to deploy Non-Static Website/Applications](#how-to-deploy-non-static-website-applications)
49
52
50
53
## How to deploy Fully Static Website?
54
+
51
55
First, follow the previous section in this documentation: [How to use Nixpacks](#how-to-use-nixpacks). After that, proceed with the steps below.
1.**Branch:** Coolify will automatically detect the branch from your Repostiory.
56
60
57
61
2.**Base Directory:** Enter the directory Nixpacks should use as the root (for example, `/` if your files are at the root, or a subfolder if applicable).
62
+
58
63
- If you have a monorepo then you can enter the path of the directory you want to use as base directory (`/backend` for example)
59
64
60
65
3.**Is it a static Site?:** Click on this option to enable static mode.
@@ -69,38 +74,36 @@ First, follow the previous section in this documentation: [How to use Nixpacks](
- As of Coolify **v4.0.0-beta.404**, the only web server option available is [Nginx ↗](https://nginx.org/en/?utm_source=coolify.io). So **Nginx** will be selected by default.
77
+
- As of Coolify **v4.0.0-beta.404**, the only web server option available is [Nginx](https://nginx.org/en/?utm_source=coolify.io). So **Nginx** will be selected by default.
73
78
74
79
8. Click the **Deploy** button. The deployment process is usually quick (often less than a minute, depending on your server).
75
80
76
-
77
81
9. Customize Your Web Server Configuration <Badgetype="warning"text="Optional" />
- Coolify provides a default web server configuration that works for most cases.
85
+
- Coolify provides a default web server configuration that works for most cases.
82
86
83
87
- If you want to change it then click the **Generate** button to load the default settings and make any changes you need.
84
88
85
-
86
89
::: warning HEADS UP!
87
90
You have to click on the **Restart** button for the new configuration to take effect.
88
91
:::
89
92
90
-
91
93
### How this works?
92
-
Nixpacks will build the website using your codebase and create a Docker image with a web server to serve them. This means your final Docker image has a web server ready to serve your HTML, CSS, and JavaScript files.
93
-
94
94
95
+
Nixpacks will build the website using your codebase and create a Docker image with a web server to serve them. This means your final Docker image has a web server ready to serve your HTML, CSS, and JavaScript files.
95
96
96
97
## How to deploy Non-Static Website/Applications?
98
+
97
99
First, follow the previous section in this documentation: [How to use Nixpacks](#how-to-use-nixpacks). After that, proceed with the steps below.
1.**Branch:** Coolify will automatically detect the branch from your Repostiory.
102
104
103
105
2.**Base Directory:** Enter the directory Nixpacks should use as the root (for example, `/` if your files are at the root, or a subfolder if applicable).
106
+
104
107
- If you have a monorepo then you can enter the path of the directory you want to use as base directory (`/backend` for example)
105
108
106
109
3.**Port:** Enter the port where your application listens for incoming requests.
@@ -111,14 +114,15 @@ First, follow the previous section in this documentation: [How to use Nixpacks](
111
114
112
115
6. After clicking the **Continue** button, you can adjust settings like your domain and environment variables, then click the **Deploy** button to launch your application.
113
116
114
-
115
117
### How this works?
116
-
Nixpacks analyzes your codebase, builds a Docker image, and then starts a container using that image.
117
118
119
+
Nixpacks analyzes your codebase, builds a Docker image, and then starts a container using that image.
118
120
119
121
## Advanced Configuration
122
+
120
123
### Environment Variables
121
-
You can customize Nixpacks' behavior using environment variables. There are many variables available for different application frameworks, and you can find detailed information in their documentation: [Nixpacks Environment Variables](https://nixpacks.com/docs/configuration/environment?utm_source=coolify.io).
124
+
125
+
You can customize Nixpacks' behavior using environment variables. There are many variables available for different application frameworks, and you can find detailed information in their documentation: [Nixpacks Environment Variables](https://nixpacks.com/docs/configuration/environment?utm_source=coolify.io).
122
126
123
127
To add or modify environment variables in Coolify, simply click on the **Environment Variables** tab, where you can manage them easily.
124
128
@@ -127,6 +131,7 @@ To add or modify environment variables in Coolify, simply click on the **Environ
127
131
---
128
132
129
133
### Commands
134
+
130
135
If needed, you can override the default install, build, and start commands. Simply scroll down to the build section on Coolify and input your custom commands.
@@ -138,12 +143,13 @@ You may need to include a `nixpacks.toml` file in your repository for these chan
138
143
---
139
144
140
145
### Configuration file
141
-
Nixpacks supports specifying build configurations in a nixpacks.toml or nixpacks.json file. If one of these files is present in the root of your repository, it will be automatically used. For more details, refer to the [Nixpacks documentation](https://nixpacks.com/docs/configuration/file?utm_source=coolify.io).
142
146
147
+
Nixpacks supports specifying build configurations in a nixpacks.toml or nixpacks.json file. If one of these files is present in the root of your repository, it will be automatically used. For more details, refer to the [Nixpacks documentation](https://nixpacks.com/docs/configuration/file?utm_source=coolify.io).
143
148
144
149
## Known issues and solutions
150
+
145
151
::: details 1. Outdated Packages/Dependencies
146
152
Sometimes, Nixpacks may use older package versions. If you encounter this issue, update the `nixpkgs` archive version in your `nixpacks.toml` file. You can learn more about this in the Nixpacks docs on [nixpkgs archive](https://nixpacks.com/docs/configuration/file#nixpkgs-archive?utm_source=coolify.io)
147
153
148
154
This is a Nixpacks-related issue, not a Coolify issue. For further assistance, please contact the Nixpacks support team.
0 commit comments