Skip to content

Commit 388b1da

Browse files
authored
docs for v1.9 (#12)
1 parent bb9a2aa commit 388b1da

29 files changed

+453
-18
lines changed

.github/workflows/build-push-images-dev.yaml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,19 @@ jobs:
6464
id: get-commit
6565
run: echo "commit_message=$(git log -1 --pretty=format:%s)" >> $GITHUB_OUTPUT
6666

67-
- name: Deploy to Zaneops
68-
uses: zane-ops/auto-deploy-action@v4
67+
- name: Bypass Cloudflare for GitHub Action
68+
uses: xiaotianxt/bypass-cloudflare-for-github-action@v1.1.1
6969
with:
70-
SERVICE_IMAGE: ghcr.io/zane-ops/docs:${{ github.sha }}
71-
DEPLOY_WEBHOOK_URL: ${{ secrets.STAGING_DEPLOY_WEBHOOK_URL }}
72-
COMMIT_MESSAGE: ${{ steps.get-commit.outputs.commit_message }}
73-
EXTRA_HEADERS: '{ "CF-Access-Client-Id": "${{ secrets.CF_CLIENT_ID }}", "CF-Access-Client-Secret": "${{ secrets.CF_CLIENT_SECRET }}" }'
70+
cf_zone_id: ${{ secrets.CF_ZONE_ID }}
71+
cf_api_token: ${{ secrets.CF_API_TOKEN }}
72+
- name: Deploy to ZaneOps
73+
run: |
74+
curl -f -o /dev/null --fail \
75+
-H "CF-Access-Client-Id: ${{ secrets.CF_CLIENT_ID }}" \
76+
-H "CF-Access-Client-Secret: ${{ secrets.CF_CLIENT_SECRET }}" \
77+
-X PUT ${{ secrets.STAGING_DEPLOY_WEBHOOK_URL }} \
78+
--data '{
79+
"commit_message": "${{ steps.get-commit.outputs.commit_message }}",
80+
"new_image": "ghcr.io/zane-ops/docs:${{ github.sha }}"
81+
}'
82+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ pnpm-debug.log*
2020

2121
# macOS-specific files
2222
.DS_Store
23+
.railpack/

Caddyfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
:80 {
1+
:{$PORT:80} {
22
# Set the root directory for static files
3-
root * /var/www/html
3+
root * {$PUBLIC_ROOT:/var/www/html}
44
file_server
55

66
log
7-
7+
88
@assets {
99
path_regexp assets \.(css|js|png|jpg|jpeg|gif|svg|woff|woff2|eot|ttf|otf)$
1010
}
1111

1212
header @assets Cache-Control "public, max-age=31536000, immutable"
13-
13+
1414
handle_errors {
1515
@404 {
1616
expression {http.error.status_code} == 404

public/images/bulk-deploy.png

52 KB
Loading
Loading
Loading
161 KB
Loading
207 KB
Loading

public/images/nixpacks-builder.png

157 KB
Loading
848 KB
Loading

public/images/railpack-builder.png

202 KB
Loading

public/images/single-env-variable.png

67.4 KB
Loading

public/images/static-dir-builder.png

180 KB
Loading

public/videos/nixpacks-ssr.mp4

9.32 MB
Binary file not shown.

public/videos/nixpacks-static.mp4

7.73 MB
Binary file not shown.

public/videos/railpack-builder.mp4

7.56 MB
Binary file not shown.

public/videos/static-dir-builder.mp4

6.67 MB
Binary file not shown.

src/content/docs/changelog/announcing-v1.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ description: 'ZaneOps v1.0 is here'
44
# template: 'splash'
55
---
66

7+
<span className='text-gray-600 dark:text-gray-400'>27 Feb 2025</span> by [**Fred KISSIE**](https://github.com/Fredkiss3)
8+
79
ZaneOps v1.0 is finally here!
810

911
ZaneOps is a beautiful, self-hosted, open-source platform for hosting static sites, web apps, databases, services (like **Umami**, **WordPress**, **Supabase**), workers, or anything else you need—whether you’re launching a startup or managing an enterprise.

src/content/docs/changelog/v1.7.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ description: 'See all the new and interesting changes in ZaneOps v1.7'
55

66
import {Aside} from '@astrojs/starlight/components';
77

8+
<span className='text-gray-600 dark:text-gray-400'>22 Mar 2025</span> by [**Fred KISSIE**](https://github.com/Fredkiss3)
9+
810

911
Since the release of [v1.0](./announcing-v1.mdx), we added a lot more changes.
1012

src/content/docs/changelog/v1.8.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ title: ZaneOps v1.8
33
description: 'We support git repositories now'
44
---
55

6-
76
import {Aside} from '@astrojs/starlight/components';
87

98

9+
<span className='text-gray-600 dark:text-gray-400'>31 Mar 2025</span> by [**Fred KISSIE**](https://github.com/Fredkiss3)
10+
11+
1012
Today we release zaneOps v1.8 introducing our all new [Git services](/knowledge-base/git-services).
1113

1214
**To install :**

src/content/docs/changelog/v1.9.mdx

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
title: ZaneOps v1.9
3+
description: '1, 2, 3 new builders!'
4+
---
5+
6+
import {Aside} from '@astrojs/starlight/components';
7+
8+
<span className='text-gray-600 dark:text-gray-400'>20 Apr 2025</span> by [**Fred KISSIE**](https://github.com/Fredkiss3)
9+
10+
Today we release zaneOps v1.9 introducing not 1, not 2, but [3 new builders](/knowledge-base/builders/nixpacks-builder) for your git services!
11+
12+
13+
**To install :**
14+
15+
1. via the UI :
16+
<img className="block dark:hidden" src="/images/new-version-toast-light.png" alt="clone environment modal" />
17+
<img className="!hidden dark:!block" src="/images/new-version-toast-dark.png" alt="clone environment modal" />
18+
19+
<img className="block dark:hidden" src="/images/new-version-modal-light.png" alt="project environments page" />
20+
<img className="!hidden dark:!block" src="/images/new-version-modal-dark.png" alt="project environments page" />
21+
22+
23+
3. via the shell :
24+
```shell
25+
# assuming you are at /var/www/zaneops
26+
curl https://cdn.zaneops.dev/makefile > Makefile
27+
make setup
28+
make deploy
29+
```
30+
31+
### Nixpacks builder
32+
33+
[Nixpacks](https://nixpacks.com) is an open source tool developped by [railway](https://railway.app) that automatically detects your stack, language or framework
34+
and produce a Dockerfile for building your application.
35+
36+
With this, when you want to deploy a new service, no need to specify a `Dockerfile` when deploying a service from a git repository,
37+
whether it is a next.js web application, a Svelte SPA or a Django backend API, it will automatically detect it for you.
38+
39+
<video src='/videos/nixpacks-ssr.mp4' muted controls alt="Nixpacks SSR" />
40+
41+
#### Bonus: static websites
42+
43+
In some cases, you might want to deploy a statically generated websites.
44+
You can check static website checkbox when creating your service or in your service settings.
45+
46+
47+
<video src='/videos/nixpacks-static.mp4' muted controls alt="Nixpacks static" />
48+
49+
### Railpack builder
50+
51+
[Railpack](https://railpack.com) is the new version of Nixpacks by Railway, still open source. The benefits over Nixpacks are
52+
faster builds and smaller image sizes. The railpack builder support all the same options as the Nixpacks builder.
53+
54+
As of now the railpack builder is in **bêta** as a v1 of railpack hasn't been released yet.
55+
56+
<video src='/videos/railpack-builder.mp4' muted controls alt="Railpack" />
57+
58+
### Static directory builder
59+
60+
In ZaneOps, you can deploy a simple HTML/CSS/JS pre-built static website,
61+
it will be deployed as a simple [Caddy](https://caddyserver.com) with alpine docker container.
62+
63+
<video src='/videos/static-dir-builder.mp4' muted controls alt="Static directory builder" />
64+
65+
### Other changes
66+
67+
You can now deploy multiple services at once in the project details page:
68+
![Bulk deploy services](/images/bulk-deploy.png)

src/content/docs/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: ZaneOps is a self-hosted, open source platform as a service for hos
44
template: splash
55
banner:
66
content: |
7-
<a href="/changelog/v18/" class="flex items-center gap-1 justify-center">We support Git services now (v1.8) <svg aria-hidden="true" class="astro-vnzlvqnm astro-445ym5ac" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5em;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"></path></svg></a>
7+
<a href="/changelog/v19/" class="flex items-center gap-1 justify-center">In v1.9, ZaneOps replaces Vercel (well... kinda) <svg aria-hidden="true" class="astro-vnzlvqnm astro-445ym5ac" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5em;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"></path></svg></a>
88
hero:
99
tagline: your all-in-one self-hosted platform for deploying apps with <em>✨ zen ✨</em>.
1010
image:
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Dockerfile Builder
3+
description: Overview of dockerfile builder
4+
---
5+
6+
import {Aside} from '@astrojs/starlight/components';
7+
8+
> Introduced in [**v1.8.0**](/changelog/v18)
9+
10+
<Aside type="caution" title='Docker build resource usage'>
11+
The Docker build process can consume up to 100% of your server's resources, potentially slowing it to a crawl.
12+
Make sure your server is powerful enough to handle it.
13+
</Aside>
14+
<Aside type="tip" title='Network access'>
15+
When building your application, the build process will happen inside of the same network as your service,
16+
allowing you to access services inside of the same network.
17+
</Aside>
18+
19+
20+
You can deploy services from a git repository if you have a `Dockerfile` inside of it.
21+
22+
![Dockerfile settings](/images/dockerfile-builder-settings.png)
23+
24+
- You can specify a **build context directory** for where the dockerfile should build your application, relative to the root of your repository
25+
- You can specify the path of your **Dockerfile**, relative to the root of your repository
26+
- And you can specify a **Docker build stage target** if you build your image using a multi-stage build and want to stop at a certain step of the build
27+
28+
### Environment variables
29+
30+
When building your application, ZaneOps will put all the environment variables
31+
that need to be passed to the build process into an `.env` file at the root of the **build context directory**.
32+
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
title: Nixpacks Builder
3+
description: Overview of nixpacks builder
4+
---
5+
import {Aside} from '@astrojs/starlight/components';
6+
7+
> Introduced in [**v1.9.0**](/changelog/v19)
8+
9+
<Aside type="caution" title='Docker build resource usage'>
10+
The Docker build process can consume up to 100% of your server's resources, potentially slowing it to a crawl.
11+
Make sure your server is powerful enough to handle it.
12+
</Aside>
13+
14+
<Aside type="tip" title='Network access'>
15+
When building your application, the build process will happen inside of the same network as your service,
16+
allowing you to access services inside of the same network.
17+
</Aside>
18+
19+
[Nixpacks](https://nixpacks.com) is an open source tool developped by [railway](https://railway.app) that automatically detects your stack, language or framework
20+
and produce a Dockerfile for building your application.
21+
22+
With this, when you want to deploy a new service, no need to specify a `Dockerfile` when deploying a service from a git repository,
23+
whether it is a next.js web application, a Svelte SPA or a Django backend API, it will automatically detect it for you.
24+
25+
26+
## How to create a service with nixpacks
27+
28+
You can specify the nixpacks builder when creating your service or modify the builder at any moment in the service's settings.
29+
30+
![Create a service with Nixpacks builder](/images/create-git-service-nixpacks-builder.png)
31+
32+
33+
- You need to specify a **build directory**, where nixpacks will detect and build your application, relative to the root of your repository
34+
- You can specify custom **install**, **build** and **start** commands to configure nixpacks and override the auto-generated
35+
commands by nixpacks
36+
![Nixpacks settings](/images/nixpacks-builder.png)
37+
38+
39+
## Static websites
40+
41+
The nixpacks builder support deploying static websites, when deploying a static website with ZaneOps, it will be built as a service using a [caddy on alpine](https://hub.docker.com/_/caddy) image,
42+
with your build assets copied exposed as a file server.
43+
For that you need to check the static website checkbox and specify a publish directory relative to the build directory.
44+
45+
- You can also specify the path for a custom not found page, relative to the **published directory**, used for handling all 404 errors.
46+
- If your app is a **Single Page Application (SPA)**, you can check the box and specify the location of **index.html** page to redirect requests to,
47+
the Not found page is ignored as all requests will be sent to the **index.html** page instead.
48+
49+
### Overriding the default Caddyfile
50+
51+
When updating your options in the UI, ZaneOps will show you a preview of the generated [Caddyfile](https://caddyserver.com/docs/caddyfile) that will be used to expose the static
52+
assets generated by your app.
53+
![Nixpacks static settings](/images/nixpacks-builder-static.png)
54+
55+
You can override the generated file by providing a Caddyfile at the root of your **build directory**.
56+
When specifying this, ZaneOps use it over the default generated one.
57+
With this you can add things like caching or simple HTTP basic authentication to your static websites.
58+
59+
When specifying a custom Caddyfile, you can use :
60+
- the environment variable **`$PUBLIC_ROOT`** as the root for static files
61+
- the environment variable **`$PORT`** as the port for exposing your app
62+
63+
Here is A fully working example of a custom Caddyfile :
64+
```ini
65+
# ./Caddyfile
66+
# expose your app to $PORT and use 80 if undefined
67+
:{$PORT:80} {
68+
# Set the root directory for static files
69+
root * {$PUBLIC_ROOT}
70+
# Serve static files
71+
file_server
72+
# Add `cache-control` header to static assets, images and videos
73+
@assets {
74+
path_regexp assets \.(css|js|png|jpg|jpeg|gif|svg|woff|woff2|eot|ttf|otf|mp4)$
75+
}
76+
header @assets Cache-Control "public, max-age=31536000, immutable"
77+
# For all 404 errors, show a custom page
78+
handle_errors {
79+
@404 {
80+
expression {http.error.status_code} == 404
81+
}
82+
rewrite @404 ./404/index.html
83+
file_server
84+
}
85+
}
86+
```
87+
88+
89+
## Configuring nixpacks
90+
91+
To configure nixpacks, you can :
92+
93+
1. Alongside the custom **install/build/start** commands, you can customize nixpacks by passing all environment
94+
variables supported by nixpacks, they all starts with `NIXPACKS_`.
95+
96+
97+
You can find the common Nixpacks environment variables here : https://nixpacks.com/docs/configuration/environment
98+
99+
For specific environment variables related to the provider detected by Nixpacks, you will need to refer to the docs for that provider.
100+
For ex, you can override the node version with `NIXPACKS_NODE_VERSION` for the `Node` provider : https://nixpacks.com/docs/providers/node
101+
102+
Here is an example of environment variables you can add :
103+
```shell
104+
NIXPACKS_APT_PACKAGES="wget,git" # install wget & git with apt-get
105+
NIXPACKS_NODE_VERSION="22.x" # install node `22`
106+
```
107+
2. You can add a custom [nixpacks.toml](https://nixpacks.com/docs/configuration/file) configuration file, at the root of your **build directory** :
108+
109+
With this you can add more steps to the build process, customize the different commands, and even change the auto-detected provider by nixpacks.
110+
111+
Here's an example of a nixpacks configuration that :
112+
- adds a new step
113+
- customize the build command
114+
- and install custom apt packages
115+
```toml
116+
# ./nixpacks.toml
117+
[phases.setup]
118+
aptPkgs = ["...", "wget", "git"] # Install git & wget packages with apt-get
119+
120+
[phases.lint] # add new `lint` step
121+
cmds = ["yarn run lint"]
122+
dependsOn = ["install"]
123+
124+
[phases.build]
125+
dependsOn = ["...", "lint"] # build should come after `lint`
126+
cmds = ["pnpm run db:generate && pnpm run build"]
127+
```
128+
129+
<Aside type="note" title='How to customize nixpacks.toml'>
130+
See here for more info about how to customize the config file : https://nixpacks.com/docs/guides/configuring-builds
131+
</Aside>
132+
133+
## Default Environment variables
134+
135+
when building with nixpacks, we will pass a default environment variable `FORCE_COLOR=true` for coloring build outputs.

0 commit comments

Comments
 (0)