The lightweight Proxy service exposes a small HTTP reverse proxy.
933
Leoxy is a lightweight reverse proxy written in Go. Route HTTP traffic to configurable upstream servers by path, or proxy TCP and UDP traffic through dedicated listeners.
/health/live and /health/ready/metricsPull the latest image:
docker pull mohamed0699/leoxy:latest
Run Leoxy and mount a local directory for its configuration:
mkdir -p leoxy
docker run --rm -p 80:80 -v "${PWD}/leoxy:/app/leoxy" mohamed0699/leoxy:latest
Leoxy reads configuration from leoxy/leoxy_config.yaml. On first start, it creates a default configuration in the mounted directory.
services:
leoxy:
image: mohamed0699/leoxy:latest
ports:
- "80:80"
volumes:
- ./leoxy:/app/leoxy
restart: unless-stopped
Start the service:
docker compose up -d
Add upstreams to leoxy/leoxy_config.yaml. For services in the same Compose network, use the service name as the hostname:
upstream:
- name: "Backend"
path: /api
servers:
- "http://backend:9000"
For an application running directly on the Docker host, use host.docker.internal. On Linux Docker Engine, add this to the Leoxy service:
extra_hosts:
- "host.docker.internal:host-gateway"
The backend must listen on 0.0.0.0 to accept connections from the container. Inside a container, localhost refers to that container itself.
Set secrets such as API_KEYS, JWT_SECRET, and REDIS_PASSWORD through environment variables. Do not put secrets in the image or commit them to your repository.
Content type
Image
Digest
sha256:7a8476846…
Size
8 MB
Last updated
2 days ago
docker pull mohamed0699/leoxy