-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (61 loc) · 1.85 KB
/
docker-compose.yml
File metadata and controls
65 lines (61 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Dev compose for the utopia-php/proxy.
#
# Quick start:
#
# docker compose up --build # HTTP proxy on :8080
# docker compose up --build tcp-proxy # TCP proxy on :5432/:3306
# docker compose up --build smtp-proxy # SMTP proxy on :25
#
# Custom resolver (mount a PHP file that returns a Resolver instance):
#
# docker compose run -v ./resolver.php:/etc/utopia-proxy/resolver.php http-proxy
#
# Environment overrides (defaults in .env or inline):
#
# HTTP_BACKEND_ENDPOINT=10.0.0.2:5678 docker compose up http-proxy
# TCP_BACKEND_ENDPOINT=10.0.0.2:5432 docker compose up tcp-proxy
services:
http-proxy:
build: .
container_name: utopia-http-proxy
ports:
- "${HTTP_PORT:-8080}:8080"
environment:
HTTP_BACKEND_ENDPOINT: "${HTTP_BACKEND_ENDPOINT:-host.docker.internal:5678}"
HTTP_WORKERS: "${HTTP_WORKERS:-4}"
HTTP_SKIP_VALIDATION: "1"
restart: unless-stopped
tcp-proxy:
build: .
container_name: utopia-tcp-proxy
network_mode: host
cap_add:
- BPF
- NET_ADMIN
- SYS_RESOURCE
- IPC_LOCK
ulimits:
nofile:
soft: 1048576
hard: 1048576
memlock: -1
environment:
TCP_BACKEND_ENDPOINT: "${TCP_BACKEND_ENDPOINT:-127.0.0.1:15432}"
TCP_POSTGRES_PORT: "${TCP_POSTGRES_PORT:-5432}"
TCP_MYSQL_PORT: "${TCP_MYSQL_PORT:-3306}"
TCP_WORKERS: "${TCP_WORKERS:-4}"
TCP_SKIP_VALIDATION: "1"
TCP_SOCKMAP_ENABLED: "${TCP_SOCKMAP_ENABLED:-0}"
TCP_SOCKMAP_BPF_OBJECT: "/opt/proxy/relay.bpf.o"
restart: unless-stopped
command: ["tcp"]
smtp-proxy:
build: .
container_name: utopia-smtp-proxy
ports:
- "${SMTP_PORT:-25}:25"
environment:
SMTP_BACKEND_ENDPOINT: "${SMTP_BACKEND_ENDPOINT:-host.docker.internal:1025}"
SMTP_SKIP_VALIDATION: "1"
restart: unless-stopped
command: ["smtp"]