From adaa1d233689ebdf502b6cd017949d84b53f48c3 Mon Sep 17 00:00:00 2001 From: Evgeniy Spirin Date: Sun, 22 Feb 2026 11:12:58 +0000 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20docker-compose.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 88 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..efa39f1 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,88 @@ +x-common: &common + ulimits: + nofile: + soft: 1048576 + hard: 1048576 + restart: always + networks: + - remnawave-network + +x-logging: &logging + logging: + driver: json-file + options: + max-size: 100m + max-file: 5 + +x-env: &env + env_file: .env + +services: + remnawave: + image: remnawave/backend:2 + container_name: remnawave + hostname: remnawave + <<: [*common, *logging, *env] + ports: + - 4000:${APP_PORT:-3000} + - 4001:${METRICS_PORT:-3001} + healthcheck: + test: ['CMD-SHELL', 'curl -f http://localhost:${METRICS_PORT:-3001}/health'] + interval: 30s + timeout: 5s + retries: 3 + start_period: 30s + depends_on: + remnawave-db: + condition: service_healthy + remnawave-redis: + condition: service_healthy + + remnawave-db: + image: postgres:17.6 + container_name: remnawave-db + hostname: remnawave-db + <<: [*common, *logging, *env] + environment: + - POSTGRES_USER=${POSTGRES_USER} + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + - POSTGRES_DB=${POSTGRES_DB} + - TZ=UTC + ports: + - 127.0.0.1:6767:5432 + volumes: + - remnawave-db-data:/var/lib/postgresql/data + healthcheck: + test: ['CMD-SHELL', 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'] + interval: 3s + timeout: 10s + retries: 3 + + remnawave-redis: + image: valkey/valkey:8.1-alpine + container_name: remnawave-redis + hostname: remnawave-redis + <<: [*common, *logging] + command: > + valkey-server + --save "" + --appendonly no + --maxmemory-policy noeviction + --loglevel warning + healthcheck: + test: ['CMD', 'valkey-cli', 'ping'] + interval: 3s + timeout: 3s + retries: 3 + +networks: + remnawave-network: + name: remnawave-network + driver: bridge + external: false + +volumes: + remnawave-db-data: + name: remnawave-db-data + driver: local + external: false