70 lines
1.7 KiB
YAML
70 lines
1.7 KiB
YAML
services:
|
|
relay:
|
|
build:
|
|
context: .
|
|
args:
|
|
TELEBIT_REF: ${TELEBIT_REF:-master}
|
|
image: localhost/telebit-go:local
|
|
pull_policy: build
|
|
command:
|
|
- telebit-relay
|
|
- --secret
|
|
- ${SECRET:?set SECRET in .env}
|
|
- --api-hostname
|
|
- ${TUNNEL_DOMAIN:?set TUNNEL_DOMAIN in .env}
|
|
- --listen
|
|
- :8085
|
|
- --auth-url
|
|
- http://mgmt:6468/api
|
|
- --acme-relay-url
|
|
- http://mgmt:6468/api/acme-relay
|
|
restart: unless-stopped
|
|
depends_on:
|
|
mgmt:
|
|
condition: service_started
|
|
ports:
|
|
- "${TELEBIT_PORT:-8085}:8085"
|
|
volumes:
|
|
- relay-acme:/var/lib/telebit/acme.d
|
|
|
|
mgmt:
|
|
image: localhost/telebit-go:local
|
|
pull_policy: never
|
|
command:
|
|
- telebit-mgmt
|
|
- --secret
|
|
- ${SECRET:?set SECRET in .env}
|
|
- --domain
|
|
- ${DOMAIN:?set DOMAIN in .env}
|
|
- --tunnel-domain
|
|
- ${TUNNEL_DOMAIN:?set TUNNEL_DOMAIN in .env}
|
|
- --db-url
|
|
- postgres://postgres:${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in .env}@postgres:5432/postgres?sslmode=disable
|
|
- --listen
|
|
- 0.0.0.0:6468
|
|
restart: unless-stopped
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
ports:
|
|
- "127.0.0.1:${MGMT_PORT:-6468}:6468"
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: postgres
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in .env}
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
|
|
volumes:
|
|
postgres-data:
|
|
relay-acme:
|