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: README.md
+12-3Lines changed: 12 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,10 @@
1
1
# updatectl
2
2
3
3
A CLI tool for automating project updates. It periodically pulls the latest changes from Git repositories or checks for new Docker images and rebuilds/restarts projects based on their type (PM2, Docker, or Image).
4
+
5
+
> [!TIP]
6
+
> For the best experience, run updatectl inside Docker. It can automatically discover and manage all your running containers.
7
+
4
8
> [!WARNING]
5
9
> This project is very barebones and a work in progress and not ready for production use.
6
10
@@ -34,6 +38,10 @@ Run `updatectl init` to create the default configuration file and set up the dae
34
38
35
39
The daemon runs automatically after init. To run manually: `updatectl watch`
Copy file name to clipboardExpand all lines: docs/quickstart.md
+101-5Lines changed: 101 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,19 +4,28 @@ This guide will get you up and running with Updatectl in minutes.
4
4
5
5
## Prerequisites
6
6
7
-
- Go installed
7
+
- Go installed (for building from source)
8
8
- Git installed
9
9
- Docker or PM2 depending on your projects
10
+
- Docker Compose (for containerized deployment)
10
11
11
12
## Installation
12
13
13
-
Download the latest release or build from source:
14
+
### From Source
14
15
15
16
```bash
16
17
go build -o updatectl
17
18
sudo mv updatectl /usr/local/bin/
18
19
```
19
20
21
+
### Using Docker
22
+
23
+
Pull the official Docker image:
24
+
25
+
```bash
26
+
docker pull ghcr.io/parcoil/updatectl:latest
27
+
```
28
+
20
29
## First Setup
21
30
22
31
1. Initialize the configuration:
@@ -32,7 +41,7 @@ sudo updatectl init
32
41
For git-based projects:
33
42
34
43
```yaml
35
-
intervalMinutes: 15
44
+
interval: 900# 15 minutes in seconds
36
45
projects:
37
46
- name: myproject
38
47
path: /path/to/project
@@ -44,7 +53,7 @@ projects:
44
53
For image-based projects (pre-built Docker images):
45
54
46
55
```yaml
47
-
intervalMinutes: 15
56
+
interval: 900# 15 minutes in seconds
48
57
projects:
49
58
- name: my-app
50
59
type: image
@@ -54,4 +63,91 @@ projects:
54
63
NODE_ENV: production
55
64
```
56
65
57
-
4. The daemon will start automatically and check for updates every 15 minutes.
66
+
4. The daemon will start automatically and check for updates every 15 minutes.
67
+
68
+
## Recommended: Running with Docker Compose
69
+
70
+
> [!TIP]
71
+
> Running updatectl inside Docker is the recommended approach. It provides isolation, automatic container discovery, and easy management.
72
+
73
+
When running in Docker, updatectl automatically discovers and manages all running containers with images from Docker Hub or GHCR. No manual configuration needed!
74
+
75
+
Create a `docker-compose.yml`:
76
+
77
+
```yaml
78
+
version: '3.8'
79
+
services:
80
+
updatectl:
81
+
image: ghcr.io/parcoil/updatectl:latest
82
+
volumes:
83
+
- /var/run/docker.sock:/var/run/docker.sock
84
+
environment:
85
+
- DOCKER_HOST=unix:///var/run/docker.sock
86
+
- UPDATECTL_INTERVAL=600 # 10 minutes in seconds
87
+
restart: unless-stopped
88
+
89
+
# Your other services...
90
+
my-app:
91
+
image: docker.io/my-app:latest
92
+
ports:
93
+
- "80:80"
94
+
# ...
95
+
```
96
+
97
+
Environment variables:
98
+
- `UPDATECTL_INTERVAL`: Check interval in seconds (default: 600)
99
+
100
+
### Benefits of Docker Deployment
101
+
102
+
- **Automatic Discovery**: Finds all running containers automatically
103
+
- **No Configuration**: Works out-of-the-box with existing containers
104
+
- **Isolation**: Runs in its own container without affecting host system
105
+
- **Easy Updates**: Update updatectl itself by rebuilding the image
106
+
107
+
### How It Works
108
+
109
+
Updatectl will automatically monitor all containers with `docker.io/`, `ghcr.io/`, or registry images and restart them when new versions are available. It inspects container ports and environment variables to preserve your configuration.
110
+
111
+
Then run:
112
+
113
+
```bash
114
+
docker compose up -d
115
+
```
116
+
117
+
Updatectl runs inside a container and controls Docker on the host via the mounted socket.
118
+
119
+
## Direct Docker Run (Without Compose)
120
+
121
+
If you prefer not to use Docker Compose, you can run updatectl directly with `docker run`.
0 commit comments