Update docker-compose.yml
This commit is contained in:
parent
6705f7bff9
commit
0433394e01
@ -1,23 +1,19 @@
|
|||||||
# docker-compose.yml
|
|
||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
# ── Database ────────────────────────────────────────────────────────────────
|
# ── Postgres ────────────────────────────────────────────────────────────────
|
||||||
db:
|
db:
|
||||||
image: postgres:15-alpine
|
image: postgres:15-alpine
|
||||||
container_name: lnbits_db
|
container_name: lnbits_db
|
||||||
env_file:
|
|
||||||
- .env
|
|
||||||
environment:
|
environment:
|
||||||
# these come from your .env:
|
POSTGRES_USER: "${DB_USER}"
|
||||||
POSTGRES_USER: ${DB_USER}
|
POSTGRES_PASSWORD: "${DB_PASS}"
|
||||||
POSTGRES_PASSWORD: ${DB_PASS}
|
POSTGRES_DB: "${DB_NAME}"
|
||||||
POSTGRES_DB: ${DB_NAME}
|
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
|
test: ["CMD", "pg_isready", "-U", "${DB_USER}"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
@ -27,10 +23,11 @@ services:
|
|||||||
web:
|
web:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile.web # or your one‐and‐only Dockerfile if you merge them
|
dockerfile: Dockerfile
|
||||||
container_name: discord-lnbits-web
|
container_name: discord-lnbits-web
|
||||||
env_file:
|
environment:
|
||||||
- .env
|
DATABASE_URL: "${DATABASE_URL}"
|
||||||
|
FLASK_SECRET: "${FLASK_SECRET}"
|
||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@ -38,14 +35,23 @@ services:
|
|||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
# ── Discord Bot ─────────────────────────────────────────────────────────────
|
# ── Discord Lightning Bot ──────────────────────────────────────────────────
|
||||||
bot:
|
bot:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile # your existing Dockerfile for the Python bot
|
dockerfile: Dockerfile
|
||||||
container_name: discord-lnbits-bot
|
container_name: discord-lnbits-bot
|
||||||
env_file:
|
environment:
|
||||||
- .env
|
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:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
Loading…
x
Reference in New Issue
Block a user