38 lines
806 B
YAML
38 lines
806 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
bot:
|
|
build:
|
|
context: ..
|
|
dockerfile: docker/Dockerfile
|
|
container_name: marzban_bot
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ../:/app
|
|
# Force use of the container database
|
|
environment:
|
|
- DATABASE_URL=postgresql://marzban:marzban_pass@db:5432/marzban_bot
|
|
env_file:
|
|
- ../.env
|
|
ports:
|
|
- "8888:8888"
|
|
depends_on:
|
|
- db
|
|
|
|
db:
|
|
image: postgres:15-alpine
|
|
container_name: marzban_db
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: marzban
|
|
POSTGRES_PASSWORD: marzban_pass
|
|
POSTGRES_DB: marzban_bot
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
# Expose port if you want to connect externally (e.g. DBeaver)
|
|
ports:
|
|
- "5432:5432"
|
|
|
|
volumes:
|
|
postgres_data:
|