discord-lnbits-bot/docker-compose.yml

56 lines
1.7 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# docker-compose.yml
version: "3.8"
services:
# ── Database ────────────────────────────────────────────────────────────────
db:
image: postgres:15-alpine
container_name: lnbits_db
env_file:
- .env
environment:
# these come from your .env:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASS}
POSTGRES_DB: ${DB_NAME}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
# ── Web UI ──────────────────────────────────────────────────────────────────
web:
build:
context: .
dockerfile: Dockerfile.web # or your oneandonly Dockerfile if you merge them
container_name: discord-lnbits-web
env_file:
- .env
depends_on:
db:
condition: service_healthy
ports:
- "3000:3000"
restart: unless-stopped
# ── Discord Bot ─────────────────────────────────────────────────────────────
bot:
build:
context: .
dockerfile: Dockerfile # your existing Dockerfile for the Python bot
container_name: discord-lnbits-bot
env_file:
- .env
depends_on:
db:
condition: service_healthy
restart: unless-stopped
volumes:
postgres_data: