Добавить docker-compose.yml
This commit is contained in:
88
docker-compose.yml
Normal file
88
docker-compose.yml
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user