1
- # parachute - A minimal HTTP proxy for zero-downtime deployments 🪂
1
+ # kamal-proxy - A minimal HTTP proxy for zero-downtime deployments 🪂
2
2
3
3
## What it does
4
4
5
- ` parachute ` is a tiny HTTP proxy, designed to make it easy to coordinate
6
- zero-downtime deployments. By running a web application behind ` parachute ` you can
5
+ ` kamal-proxy ` is a tiny HTTP proxy, designed to make it easy to coordinate
6
+ zero-downtime deployments. By running a web application behind ` kamal-proxy ` you can
7
7
deploy changes to it without interruping any of the traffic that's in progress.
8
8
No particular cooperation from the application is required for this to work.
9
9
10
10
11
11
## A quick overview
12
12
13
- To run an instance of the proxy, use the ` parachute run` command. There's no
13
+ To run an instance of the proxy, use the ` kamal-proxy run` command. There's no
14
14
configuration file, but there are some options you can specify if the defaults
15
15
aren't right for your application.
16
16
17
17
For example, to run the proxy on a port other than 80 (the default) you could:
18
18
19
- parachute run --http-port 8080
19
+ kamal-proxy run --http-port 8080
20
20
21
- Run ` parachute help run` to see the full list of options.
21
+ Run ` kamal-proxy help run` to see the full list of options.
22
22
23
23
To route traffic through the proxy to a web application, you ` deploy ` instances
24
24
of the application to the proxy. Deploying an instance makes it available to the
@@ -28,7 +28,7 @@ Use the format `hostname:port` when specifying the instance to deploy.
28
28
29
29
For example:
30
30
31
- parachute deploy service1 --target web-1:3000
31
+ kamal-proxy deploy service1 --target web-1:3000
32
32
33
33
This will instruct the proxy to register ` web-1:3000 ` to receive traffic under
34
34
the service name `service1. It will immediately begin running HTTP health checks
@@ -40,7 +40,7 @@ command will stop the deployment and return a non-zero exit code, so that
40
40
deployment scripts can handle the failure appropriately.
41
41
42
42
Each deployment takes over traffic from the previously deployed instance. As
43
- soon as parachute determines that the new instance is healthy, it will route all
43
+ soon as kamal-proxy determines that the new instance is healthy, it will route all
44
44
new traffic to that instance.
45
45
46
46
The ` deploy ` command will wait for traffic to drain from the old instance before
@@ -54,36 +54,36 @@ with zero downtime.
54
54
### Host-based routing
55
55
56
56
Host-based routing allows you to run multiple applications on the same server,
57
- using a single instance of ` parachute ` to route traffic to all of them.
57
+ using a single instance of ` kamal-proxy ` to route traffic to all of them.
58
58
59
59
When deploying an instance, you can specify a host that it should serve traffic
60
60
for:
61
61
62
- parachute deploy service1 --target web-1:3000 --host app1.example.com
62
+ kamal-proxy deploy service1 --target web-1:3000 --host app1.example.com
63
63
64
64
When deployed in this way, the instance will only receive traffic for the
65
65
specified host. By deploying multiple instances, each with their own host, you
66
66
can run multiple applications on the same server without port conflicts.
67
67
68
68
Only one service at a time can route a specific host:
69
69
70
- parachute deploy service1 --target web-1:3000 --host app1.example.com
71
- parachute deploy service2 --target web-2:3000 --host app1.example.com # returns "Error: host is used by another service"
72
- parachute remove service1
73
- parachute deploy service2 --target web-2:3000 --host app1.example.com # suceeds
70
+ kamal-proxy deploy service1 --target web-1:3000 --host app1.example.com
71
+ kamal-proxy deploy service2 --target web-2:3000 --host app1.example.com # returns "Error: host is used by another service"
72
+ kamal-proxy remove service1
73
+ kamal-proxy deploy service2 --target web-2:3000 --host app1.example.com # suceeds
74
74
75
75
76
76
### Automatic TLS
77
77
78
- ` parachute ` can automatically obtain and renew TLS certificates for your
78
+ ` kamal-proxy ` can automatically obtain and renew TLS certificates for your
79
79
applications. To enable this, add the ` --tls ` flag when deploying an instance:
80
80
81
- parachute deploy service1 --target web-1:3000 --host app1.example.com --tls
81
+ kamal-proxy deploy service1 --target web-1:3000 --host app1.example.com --tls
82
82
83
83
84
84
## Building
85
85
86
- To build ` parachute ` locally, if you have a working Go environment you can:
86
+ To build ` kamal-proxy ` locally, if you have a working Go environment you can:
87
87
88
88
make
89
89
@@ -101,7 +101,7 @@ You can start up a sample environment to try it out using Docker Compose:
101
101
This will start the proxy, and 4 instances of a simple web server. You can run
102
102
proxy commands with ` docker compose exec proxy ... ` , for example:
103
103
104
- docker compose exec proxy parachute deploy service1 --target parachute -web-1:3000
104
+ docker compose exec proxy kamal-proxy deploy service1 --target kamal-proxy -web-1:3000
105
105
106
106
And then access the proxy from a browser at http://localhost/ .
107
107
@@ -110,17 +110,17 @@ And then access the proxy from a browser at http://localhost/.
110
110
In some environments, like when running a Docker container, it can be convenient
111
111
to specify ` run ` options using environment variables. This avoids having to
112
112
update the ` CMD ` in the Dockerfile to change the options. To support this,
113
- ` parachute run` will read each of its options from environment variables if they
113
+ ` kamal-proxy run` will read each of its options from environment variables if they
114
114
are set. For example, setting the HTTP port can be done with either:
115
115
116
- parachute run --http-port 8080
116
+ kamal-proxy run --http-port 8080
117
117
118
118
or:
119
119
120
- HTTP_PORT=8080 parachute run
120
+ HTTP_PORT=8080 kamal-proxy run
121
121
122
122
If any of the environment variables conflict with something else in your
123
- environment, you can prefix them with ` PARACHUTE_ ` to disambiguate them. For
123
+ environment, you can prefix them with ` KAMAL_PROXY_ ` to disambiguate them. For
124
124
example:
125
125
126
- PARACHUTE_HTTP_PORT =8080 parachute run
126
+ KAMAL_PROXY_HTTP_PORT =8080 kamal-proxy run
0 commit comments