Update docker-compose.yml
This commit is contained in:
parent
b4356f1182
commit
6705f7bff9
@ -1,17 +1,33 @@
|
|||||||
|
# docker-compose.yml
|
||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
bot:
|
|
||||||
build: .
|
# ── Database ────────────────────────────────────────────────────────────────
|
||||||
container_name: discord-lnbits-bot
|
db:
|
||||||
|
image: postgres:15-alpine
|
||||||
|
container_name: lnbits_db
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
depends_on:
|
environment:
|
||||||
db:
|
# these come from your .env:
|
||||||
condition: service_healthy
|
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
|
restart: unless-stopped
|
||||||
|
|
||||||
|
# ── Web UI ──────────────────────────────────────────────────────────────────
|
||||||
web:
|
web:
|
||||||
build: .
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile.web # or your one‐and‐only Dockerfile if you merge them
|
||||||
container_name: discord-lnbits-web
|
container_name: discord-lnbits-web
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
@ -20,20 +36,19 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
command: gunicorn -b 0.0.0.0:3000 app:app
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
db:
|
# ── Discord Bot ─────────────────────────────────────────────────────────────
|
||||||
image: postgres:15-alpine
|
bot:
|
||||||
container_name: lnbits_db
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile # your existing Dockerfile for the Python bot
|
||||||
|
container_name: discord-lnbits-bot
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
volumes:
|
depends_on:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
db:
|
||||||
healthcheck:
|
condition: service_healthy
|
||||||
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
|
|
||||||
interval: 10s
|
|
||||||
retries: 5
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user