Update docker-compose.yml
This commit is contained in:
parent
6705f7bff9
commit
0433394e01
@ -1,23 +1,19 @@
|
||||
# docker-compose.yml
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
|
||||
# ── Database ────────────────────────────────────────────────────────────────
|
||||
# ── Postgres ────────────────────────────────────────────────────────────────
|
||||
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}
|
||||
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}"]
|
||||
test: ["CMD", "pg_isready", "-U", "${DB_USER}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@ -27,10 +23,11 @@ services:
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.web # or your one‐and‐only Dockerfile if you merge them
|
||||
dockerfile: Dockerfile
|
||||
container_name: discord-lnbits-web
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
DATABASE_URL: "${DATABASE_URL}"
|
||||
FLASK_SECRET: "${FLASK_SECRET}"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
@ -38,14 +35,23 @@ services:
|
||||
- "3000:3000"
|
||||
restart: unless-stopped
|
||||
|
||||
# ── Discord Bot ─────────────────────────────────────────────────────────────
|
||||
# ── Discord Lightning Bot ──────────────────────────────────────────────────
|
||||
bot:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile # your existing Dockerfile for the Python bot
|
||||
dockerfile: Dockerfile
|
||||
container_name: discord-lnbits-bot
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
DISCORD_TOKEN: "${DISCORD_TOKEN}"
|
||||
GUILD_ID: "${GUILD_ID}"
|
||||
ROLE_ID: "${ROLE_ID}"
|
||||
CHANNEL_ID: "${CHANNEL_ID}"
|
||||
LNBITS_URL: "${LNBITS_URL}"
|
||||
LNBITS_API_KEY: "${LNBITS_API_KEY}"
|
||||
PRICE: "${PRICE}"
|
||||
COMMAND_NAME: "${COMMAND_NAME}"
|
||||
INVOICE_MESSAGE: "${INVOICE_MESSAGE}"
|
||||
DATABASE_URL: "${DATABASE_URL}"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
Loading…
x
Reference in New Issue
Block a user