Files
zhguchiy_perchik/docker-compose.yml
T
omar 4499a6ee37
CI / validate (push) Successful in 38s
CI / gateway-contract (push) Successful in 2m1s
CI / images (deploy/Dockerfile.web, web) (push) Successful in 50s
CI / images (deploy/Dockerfile.checker, checker) (push) Successful in 1m4s
CI / images (deploy/Dockerfile.api, api) (push) Successful in 1m14s
CI / images (deploy/Dockerfile.http-gateway, http-gateway) (push) Successful in 1m11s
Add authenticated SOCKS5 exports and a live public web switch
Use the same pinned upstream, node credentials and routing restrictions for both proxy listeners.
Apply the admin-selected destination policy on each new request and verify exports with independent proxy clients.
2026-11-27 06:43:27 +03:00

85 lines
3.0 KiB
YAML

# zhguchiy_perchik — production stack. Pulls prebuilt images from the Gitea
# container registry (built & pushed by .gitea/workflows/ci.yml).
#
# cp .env.example .env # set ADMIN_PASSWORD, SESSION_SECRET
# docker compose pull
# docker compose up -d
#
# For local development that builds the images from source instead of pulling,
# add the build override:
# docker compose -f docker-compose.yml -f docker-compose.build.yml up -d --build
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-perchik}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-perchik}
POSTGRES_DB: ${POSTGRES_DB:-perchik}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-perchik} -d ${POSTGRES_DB:-perchik}"]
interval: 5s
timeout: 5s
retries: 10
checker:
image: ${REGISTRY:-git.eeee.moe/omar/zhguchiy_perchik}/checker:${TAG:-latest}
restart: unless-stopped
environment:
DB_DSN: postgres://${POSTGRES_USER:-perchik}:${POSTGRES_PASSWORD:-perchik}@postgres:5432/${POSTGRES_DB:-perchik}?sslmode=disable
LOG_LEVEL: ${LOG_LEVEL:-info}
depends_on:
postgres:
condition: service_healthy
api:
image: ${REGISTRY:-git.eeee.moe/omar/zhguchiy_perchik}/api:${TAG:-latest}
restart: unless-stopped
environment:
DB_DSN: postgres://${POSTGRES_USER:-perchik}:${POSTGRES_PASSWORD:-perchik}@postgres:5432/${POSTGRES_DB:-perchik}?sslmode=disable
ADMIN_USER: ${ADMIN_USER:-admin}
# The API requires both at startup. Unrelated targets (e.g. a standalone
# gateway canary) can load this file without panel credentials.
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-}
SESSION_SECRET: ${SESSION_SECRET:-}
LOG_LEVEL: ${LOG_LEVEL:-info}
depends_on:
postgres:
condition: service_healthy
web:
image: ${REGISTRY:-git.eeee.moe/omar/zhguchiy_perchik}/web:${TAG:-latest}
restart: unless-stopped
ports:
- "${WEB_PORT:-8088}:80"
depends_on:
- api
http-gateway:
image: ${REGISTRY:-git.eeee.moe/omar/zhguchiy_perchik}/http-gateway:${TAG:-latest}
profiles: [gateway]
restart: unless-stopped
stop_grace_period: 15s
environment:
GATEWAY_DB_DSN: ${GATEWAY_DB_DSN:-}
GATEWAY_PUBLIC_PROXY_ADDR: ${GATEWAY_PUBLIC_PROXY_ADDR:-}
GATEWAY_API_TOKEN: ${GATEWAY_API_TOKEN:-}
GATEWAY_NODE_SECRET: ${GATEWAY_NODE_SECRET:-}
GATEWAY_PROBE_URL: ${GATEWAY_PROBE_URL:-}
GATEWAY_ALLOWED_DESTINATIONS: ${GATEWAY_ALLOWED_DESTINATIONS:-}
GATEWAY_UPSTREAM_NETWORKS: ${GATEWAY_UPSTREAM_NETWORKS:-}
GATEWAY_SOCKS_PORT: ${GATEWAY_SOCKS_PORT:-1080}
ports:
- "${GATEWAY_BIND_IP:-127.0.0.1}:${GATEWAY_PROXY_PORT:-8081}:8081"
- "${GATEWAY_BIND_IP:-127.0.0.1}:${GATEWAY_API_PORT:-8082}:8082"
- "${GATEWAY_BIND_IP:-127.0.0.1}:${GATEWAY_SOCKS_PORT:-1080}:1080"
depends_on:
postgres:
condition: service_healthy
volumes:
pgdata: