Skip to content

Commit

Permalink
chore(readme): usage example in docker swarm
Browse files Browse the repository at this point in the history
  • Loading branch information
luizfonseca committed May 14, 2024
1 parent 50c0cd6 commit c35769d
Showing 1 changed file with 47 additions and 1 deletion.
48 changes: 47 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
# Proksi: Automatic SSL, HTTP, and DNS Proxy


> ⚠️ Important: this is still a work-in-progress project.
> It does the basics but everything needs polishing and real production testing.
> That said, suggestions, issues or PRs are encouraged.
Proksi is a simple, lightweight, and easy-to-use proxy server that automatically handles SSL, HTTP, and DNS traffic. It is designed to be used as a standalone proxy server or as a component in a larger system. Proksi is written in Rust and uses Pingora as its core networking library.


- [Proksi: Automatic SSL, HTTP, and DNS Proxy](#proksi-automatic-ssl-http-and-dns-proxy)
- [Usage](#usage)
- [Docker](#docker)
- [Docker Swarm](#docker-swarm)
- [Binary](#binary)
- [Command line options](#command-line-options)
- [Running Proksi](#running-proksi)
- [Docker Labels](#docker-labels)
- [Jobs to be done](#jobs-to-be-done)
- [Batteries included](#batteries-included)
- [Proxy](#proxy)
- [Middlewares/Plugins](#middlewaresplugins)
- [Extending Proksi](#extending-proksi)
- [Configuration](#configuration)
- [Examples](#examples)
- [Performance \& Benchmarks](#performance--benchmarks)
- [Why build another proxy...?](#why-build-another-proxy)


## Usage

### Docker
Expand All @@ -17,6 +36,33 @@ Similar to other proxies, Proksi can be run as a Docker container. The following
docker run -d -p 80:80 -p 443:443 -v /path/to/config:/etc/proksi/config.yaml luizfonseca/proksi
```

### Docker Swarm
One of the main purposes of Proksi is to also enable automatic service discovery and routing. To do this, you can use Proksi in conjunction with Docker Swarm:

```yaml
# docker-compose.yml
# This is an example of how to use Proksi with Docker Swarm
# This will automatically discover services and route traffic to them
# based on the labels defined in the service.

version: '3.8'
services:
proksi:
image: luizfonseca/proksi:latest
network:
- web # Any service in the same network will be able to communicate with Proksi
ports:
- "80:80"
- "443:443"
volumes:
- /path/to/config:/etc/proksi/config.yaml
deploy:
placement:
constraints:
- node.role == manager
```
### Binary
You can also run Proksi as a standalone binary using rust's `cargo`.
Expand Down

0 comments on commit c35769d

Please sign in to comment.