|
1 | | -# Dployr |
2 | | - |
3 | | -*Your app, your server, your rules!* |
| 1 | +# dployr |
4 | 2 |
|
5 | 3 | [](https://github.com/dployr-io/dployr/actions/workflows/tests.yml) |
6 | | -[](https://pkg.go.dev/github.com/dployr-io/dployr) |
7 | | -[](https://goreportcard.com/report/github.com/dployr-io/dployr) |
8 | 4 | [](https://github.com/dployr-io/dployr/releases) |
9 | | -[](LICENSE) |
| 5 | +[](LICENSE) |
10 | 6 | [](https://go.dev/dl/) |
11 | 7 |
|
12 | | -## Overview |
13 | | - |
14 | | -Dployr is a self‑hosted platform with a globally distributed control‑plane (“base”) and lightweight daemon that run on your infrastructure. |
15 | | - |
16 | | -You interact with base through: |
17 | | -- The web dashboard (dployr‑app), or |
18 | | -- The CLI (dployr‑cli) |
19 | | - |
20 | | -Both use the same programmatic, RBAC‑aware API with full auditing. Anything you do in the UI can be scripted with the CLI or called directly. |
21 | | - |
22 | | -It consists of four components: |
23 | | - |
24 | | -- dployr‑base — Globally distributed control‑plane (API, scheduling, storage). |
25 | | -- dployrd — Daemon on each instance. Connects to base over mTLS, executes tasks, and reports status. |
26 | | -- dployr‑cli — RBAC‑aware command‑line client that talks to base from anywhere. |
27 | | -- dployr‑app — Web dashboard built on the same API for managing projects, deployments, and environments. |
28 | | - |
29 | | -## Quickstart (5 minutes) |
30 | | - |
31 | | -Linux/macOS |
32 | | - |
33 | | -```bash |
34 | | -# First time install |
35 | | -curl -sSL https://raw.githubusercontent.com/dployr-io/dployr/master/install.sh \ |
36 | | - | bash -s -- --token "<bootstrap_token>" |
37 | | - |
38 | | -# Install latest version |
39 | | -curl -sSL https://raw.githubusercontent.com/dployr-io/dployr/master/install.sh | bash |
40 | | - |
41 | | -# Start the daemon |
42 | | -dployrd |
43 | | -``` |
44 | | - |
45 | | -Windows (PowerShell as Administrator) |
46 | | - |
47 | | -```powershell |
48 | | -iwr "https://raw.githubusercontent.com/dployr-io/dployr/master/install.ps1" -OutFile install.ps1 |
49 | | -.\install.ps1 # add -Token $env:DPLOYR_INSTALL_TOKEN (first time install) |
50 | | -
|
51 | | -dployrd.exe |
52 | | -``` |
53 | | - |
54 | | -## Verify |
55 | | - |
56 | | -- Version: `dployrd --version` |
57 | | -- Logs (JSON): `/var/log/dployrd/app.log` (Linux/macOS) or ProgramData on Windows |
58 | | -- Daemon should start and log a websocket mTLS connection attempt to Base. |
59 | | - |
60 | | -## Quick deploy |
61 | | - |
62 | | -```bash |
63 | | -dployr deploy \ |
64 | | - --name hello-world \ |
65 | | - --source remote \ |
66 | | - --runtime nodejs \ |
67 | | - --version 20 \ |
68 | | - --remote https://github.com/dployr-io/dployr-examples \ |
69 | | - --branch master \ |
70 | | - --build-cmd "npm install" \ |
71 | | - --run-cmd "npm start" \ |
72 | | - --working-dir "nodejs" \ |
73 | | - --port 3000 |
74 | | -``` |
75 | | - |
76 | | -## Concepts |
77 | | - |
78 | | -- CLI vs Daemon: CLI issues commands; daemon (`dployrd`) executes and syncs with Base. |
79 | | -- Sync: long‑lived WSS + mTLS. Daemon generates a client cert and publishes it to Base. |
80 | | -- Tokens: `bootstrap_token` (long‑lived, stored in DB) → exchanged for short‑lived `access_token` (auto‑refreshed). |
81 | | -- Persistence: SQLite for instance metadata, tokens, deployments, services, task results. |
82 | | -- Logging: structured JSON to stdout + `/var/log/dployrd/app.log` for remote debugging. |
83 | | - |
84 | | -## Troubleshooting |
85 | | - |
86 | | -- No bootstrap token: set it in config or rerun installer with `--token`. |
87 | | -- WS auth errors (401/403): daemon clears `access_token` and reacquires; check logs. |
88 | | -- mTLS/cert issues: ensure pinned CA/cert path is correct if you customized certs. |
89 | | -- Permissions: service managers may require admin/root for install/start. |
90 | | -- Where are logs? `/var/log/dployrd/app.log` (Linux/macOS). On Windows, see ProgramData/dployr. |
91 | | - |
92 | | ---- |
93 | | - |
94 | | -## Dependencies |
95 | | - |
96 | | -`dployr` relies on a few external tools to provide core functionality: |
97 | | -| Dependency | Purpose | Platform | |
98 | | -|-------------|----------|-----------| |
99 | | -| [Caddy](https://caddyserver.com) | Reverse proxy and automatic HTTPS management | All | |
100 | | -| [vfox](https://version-fox.dev) | Runtime and version management (Node, Python, Go, etc.) | All | |
101 | | -| [SQLite](https://sqlite.org) | Embedded database for persistence and data storage | All | |
102 | | -| [systemd](https://systemd.io) | Linux service manager for running `dployrd` as a background daemon | Linux | |
103 | | -| [launchd](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html) | macOS service manager for running `dployrd` as a background daemon | macOS | |
104 | | -| [NSSM](https://nssm.cc) | Windows service manager for running `dployrd` as a background daemon | Windows | |
105 | | -> **Note:** Each operating system uses its native service manager: `systemd` on Linux, `launchd` on macOS, and `NSSM` on Windows. |
106 | | -These binaries are automatically downloaded and configured during installation when possible. |
107 | | - |
108 | | ---- |
109 | | - |
110 | | -## Supported Runtimes |
111 | | - |
112 | | -- Static files |
113 | | -- Node.js |
114 | | -- Python |
115 | | -- Go |
116 | | -- PHP |
117 | | -- Ruby |
118 | | -- .NET |
119 | | -- Java |
120 | | -- Docker containers |
121 | | -- K3s clusters *(roadmap)* |
122 | | -- Custom runtimes |
123 | | - |
124 | | ---- |
125 | | - |
126 | | -## Installation |
127 | | - |
128 | | -### Quick Install |
129 | | - |
130 | | -**Linux/macOS** |
131 | | -```bash |
132 | | -# First-time setup |
133 | | -curl -sSL https://raw.githubusercontent.com/dployr-io/dployr/master/install.sh \ |
134 | | - | bash -s -- --token "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..." |
135 | | - |
136 | | -# Install with custom instance ID |
137 | | -curl -sSL https://raw.githubusercontent.com/dployr-io/dployr/master/install.sh \ |
138 | | - | bash -s -- --token "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..." --instance "prod-server-01" |
139 | | - |
140 | | -# Install latest version |
141 | | -curl -sSL https://raw.githubusercontent.com/dployr-io/dployr/master/install.sh \ |
142 | | - | bash |
143 | | - |
144 | | -# Install specific version |
145 | | -curl -sSL https://raw.githubusercontent.com/dployr-io/dployr/master/install.sh \ |
146 | | - | bash -s -- --version v0.1.1-beta.17 |
147 | | -``` |
148 | | -> **Note:** You’ll need administrator privileges (`sudo`) to install, but the dployr daemon itself runs as `dployr` user, not as `root`. For details about permissions and setup, visit https://dployr.io/docs/installation.html. |
149 | | -
|
150 | | -> **Config locations:** |
151 | | -> - **Linux**: `/etc/dployr/config.toml` |
152 | | -> - **macOS**: `/usr/local/etc/dployr/config.toml` |
153 | | -> - **Windows**: `C:\ProgramData\dployr\config.toml` |
154 | | -
|
155 | | -### Manual Installation |
156 | | - |
157 | | -**Linux** |
158 | | -```bash |
159 | | -# Download the latest release |
160 | | -curl -L https://github.com/dployr-io/dployr/releases/latest/download/dployr-Linux-x86_64.tar.gz -o dployr.tar.gz |
161 | | - |
162 | | -# Extract and install |
163 | | -tar -xzf dployr.tar.gz |
164 | | -sudo mv dployr dployrd /usr/local/bin/ |
165 | | -chmod +x /usr/local/bin/dployr /usr/local/bin/dployrd |
166 | | - |
167 | | -# Install Caddy |
168 | | -sudo apt update && sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https |
169 | | -curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg |
170 | | -curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list |
171 | | -sudo apt update && sudo apt install caddy |
172 | | -``` |
173 | | - |
174 | | -**Windows (PowerShell as Administrator)** |
175 | | - |
176 | | -```powershell |
177 | | -# Install latest version |
178 | | -Invoke-WebRequest -Uri "https://raw.githubusercontent.com/dployr-io/dployr/master/install.ps1" -OutFile "install.ps1" |
179 | | -.\install.ps1 |
180 | | -
|
181 | | -# Install specific version |
182 | | -Invoke-WebRequest -Uri "https://raw.githubusercontent.com/dployr-io/dployr/master/install.ps1" -OutFile "install.ps1" |
183 | | -.\install.ps1 -Version v0.1.1-beta.17 -Token $env:DPLOYR_INSTALL_TOKEN |
184 | | -
|
185 | | -# Install with custom instance ID |
186 | | -.\install.ps1 -Token $env:DPLOYR_INSTALL_TOKEN -Instance "prod-server-01" |
187 | | -
|
188 | | -# Custom install directory |
189 | | -.\install.ps1 -Version latest -InstallDir "C:\dployr" -Token $env:DPLOYR_INSTALL_TOKEN |
190 | | -``` |
191 | | - |
192 | | ---- |
193 | | - |
194 | | -### Package Managers |
195 | | - |
196 | | -**Homebrew (macOS)** |
197 | | - |
198 | | -```bash |
199 | | -brew install dployr-io/dployr/dployr |
200 | | -``` |
| 8 | +**Ship apps, not infrastructure.** |
201 | 9 |
|
202 | | -**Chocolatey (Windows)** |
203 | | - |
204 | | -```powershell |
205 | | -choco install dployr |
206 | | -``` |
| 10 | +Your server is ready the moment you sign up. Deploy from the CLI, GitHub Actions, or the dashboard. No SSH. No config files. On Pro, connect your own server. |
207 | 11 |
|
208 | | -**Scoop (Windows)** |
209 | | - |
210 | | -```powershell |
211 | | -scoop bucket add dployr https://github.com/dployr-io/scoop-dployr |
212 | | -scoop install dployr |
213 | | -``` |
| 12 | +[dployr.io](https://dployr.io) · [Docs](https://dployr.io/docs/introduction) · [Live demo](https://dployr.io/demo) |
214 | 13 |
|
215 | 14 | --- |
216 | 15 |
|
217 | | -## Configuration |
218 | | - |
219 | | -Configuration files are stored at `~/.dployr/config.toml`: |
| 16 | +## What's in this repo |
220 | 17 |
|
221 | | -```toml |
222 | | -address = "localhost" |
223 | | -port = 7879 |
224 | | -max-workers = 5 |
225 | | -secret = "your-secret-key" |
226 | | -``` |
| 18 | +**`dployr`** is the CLI. It talks to Base, the hosted control plane. |
227 | 19 |
|
228 | | ---- |
| 20 | +**`dployrd`** is the daemon that runs on your server. It opens an outbound WebSocket to Base and executes deploy instructions on arrival. Your server never accepts inbound connections. |
229 | 21 |
|
230 | | -## Usage |
| 22 | +On Hobby and Indie plans, dployr provisions and manages the server. On Pro, you run `dployrd` on your own Linux server. |
231 | 23 |
|
232 | | -### Start the Daemon |
| 24 | +## Install |
233 | 25 |
|
234 | 26 | ```bash |
235 | | -dployrd |
236 | | -``` |
237 | | - |
238 | | -### Authenticate |
239 | | - |
240 | | -```bash |
241 | | -dployr login --email user@example.com |
| 27 | +curl -sSL https://raw.githubusercontent.com/dployr-io/dployr/master/install.sh | bash |
242 | 28 | ``` |
243 | 29 |
|
244 | | -### Deploy an Application |
| 30 | +## Connect your own server (Pro) |
245 | 31 |
|
246 | 32 | ```bash |
247 | | -dployr deploy \ |
248 | | - --name old-county-times \ |
249 | | - --source remote \ |
250 | | - --runtime php \ |
251 | | - --version 8.3 \ |
252 | | - --remote https://github.com/dployr-io/dployr-examples \ |
253 | | - --branch master \ |
254 | | - --build-cmd "composer install" \ |
255 | | - --run-cmd "php -S localhost:3000" \ |
256 | | - --working-dir "php" \ |
257 | | - --port 3000 |
| 33 | +curl -sSL https://raw.githubusercontent.com/dployr-io/dployr/master/install.sh \ |
| 34 | + | bash -s -- --token "<bootstrap-token>" |
258 | 35 | ``` |
259 | | -For detailed deployment examples—including interactive guides—visit: https://dployr.io/docs/quickstart.html |
260 | | - |
261 | | -### List Deployments |
262 | 36 |
|
263 | | -```bash |
264 | | -dployr list |
265 | | -``` |
| 37 | +Get the bootstrap token from the **Instances** page in the dashboard: [dployr.io/docs/byos](https://dployr.io/docs/byos) |
266 | 38 |
|
267 | | -### Manage Services |
| 39 | +## Deploy |
268 | 40 |
|
269 | 41 | ```bash |
270 | | -dployr services list |
271 | | -dployr services get <service-id> |
| 42 | +dployr deploy --name my-api --runtime nodejs --port 3000 |
272 | 43 | ``` |
273 | 44 |
|
274 | | -### Configure Proxy |
| 45 | +## Common commands |
275 | 46 |
|
276 | 47 | ```bash |
277 | | -dployr proxy add --domain myapp.com --upstream http://localhost:3000 |
278 | | -dployr proxy list |
279 | | -dployr proxy status |
280 | | -``` |
281 | | - |
282 | | ---- |
| 48 | +dployr logs my-api --tail 100 |
283 | 49 |
|
284 | | -## API |
| 50 | +dployr env set my-api KEY=value |
| 51 | +dployr env list my-api |
285 | 52 |
|
286 | | -The daemon exposes a REST API on port `7879` (configurable). |
| 53 | +dployr domain add my-api yourdomain.com |
287 | 54 |
|
288 | | -* Full spec: [api/openapi.yaml](api/openapi.yaml) |
289 | | -* Interactive docs: [Quickstart](https://dployr.io/docs/quickstart.html) |
290 | | - |
291 | | -### Authentication |
292 | | - |
293 | | -Most endpoints require JWT authentication: |
294 | | - |
295 | | -``` |
296 | | -Authorization: Bearer <jwt-token> |
| 55 | +dployr instances |
| 56 | +dployr services |
297 | 57 | ``` |
298 | 58 |
|
299 | | ---- |
| 59 | +Full reference: [dployr.io/docs/cli](https://dployr.io/docs/cli) |
300 | 60 |
|
301 | | -## Development |
| 61 | +## Runtimes |
302 | 62 |
|
303 | | -### Prerequisites |
| 63 | +Node.js, Python, Go, PHP, Ruby, .NET, Java, Static, Docker |
304 | 64 |
|
305 | | -* Go **1.24+** |
306 | | -* Git |
| 65 | +## Build |
307 | 66 |
|
308 | | -### Build |
| 67 | +Requires Go 1.24+. |
309 | 68 |
|
310 | 69 | ```bash |
311 | | -make build # Build both binaries |
312 | | -make build-cli # Build CLI only |
313 | | -make build-daemon # Build daemon only |
| 70 | +make build |
314 | 71 | ``` |
315 | 72 |
|
316 | | -### Test |
| 73 | +## Contributing |
317 | 74 |
|
318 | | -```bash |
319 | | -make test |
320 | | -``` |
321 | | - |
322 | | -### Release |
323 | | - |
324 | | -```bash |
325 | | -./scripts/release.sh patch # Patch release |
326 | | -./scripts/release.sh minor # Minor release |
327 | | -./scripts/release.sh major # Major release |
328 | | -``` |
329 | | - |
330 | | ---- |
| 75 | +[CONTRIBUTING.md](CONTRIBUTING.md) |
331 | 76 |
|
332 | 77 | ## License |
333 | 78 |
|
334 | | -Apache License, Version 2.0 — see [LICENSE](LICENSE) for details. |
335 | | - |
336 | | ---- |
337 | | - |
338 | | -## Documentation |
339 | | - |
340 | | -Complete documentation available at |
341 | | - [https://dployr.io/docs/quickstart.html](https://dployr.io/docs/quickstart.html) |
342 | | - |
343 | | ---- |
344 | | - |
| 79 | +Apache 2.0 |
0 commit comments