docker-compose.yml
· 1.1 KiB · YAML
Raw
version: "3.8"
services:
db:
image: groonga/pgroonga:latest
container_name: teldrive_db
hostname: teldrive-db
restart: always
environment:
- POSTGRES_USER=YOUR_DB_USERNAME
- POSTGRES_PASSWORD=YOUR_DB_PASSWORD
- POSTGRES_DB=teldrive
volumes:
- teldrive_db:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "teldrive"]
interval: 10s
start_period: 30s
teldrive:
image: ghcr.io/tgdrive/teldrive
container_name: teldrive
restart: always
depends_on:
db:
condition: service_healthy
environment:
- TG_APP_ID=YOUR_API_ID #https://my.telegram.org/apps
- TG_APP_HASH=YOUR_API_HASH #https://my.telegram.org/apps
- JWT_SECRET=YOUR_GENERATED_JWT_SECRET #https://teldrive-docs.pages.dev/docs/getting-started/usage
- DB_DATA_SOURCE=postgres://YOUR_DB_USERNAME:YOUR_DB_PASSWORD@db/teldrive?sslmode=disable
volumes:
- /volume1/docker/teldrive/config.toml:/config.toml
- /volume1/docker/teldrive/session.db:/session.db
ports:
- "8080:8080"
networks:
postgres:
external: true
volumes:
teldrive_db:
| 1 | |
| 2 | version: "3.8" |
| 3 | |
| 4 | services: |
| 5 | db: |
| 6 | image: groonga/pgroonga:latest |
| 7 | container_name: teldrive_db |
| 8 | hostname: teldrive-db |
| 9 | restart: always |
| 10 | environment: |
| 11 | - POSTGRES_USER=YOUR_DB_USERNAME |
| 12 | - POSTGRES_PASSWORD=YOUR_DB_PASSWORD |
| 13 | - POSTGRES_DB=teldrive |
| 14 | volumes: |
| 15 | - teldrive_db:/var/lib/postgresql/data |
| 16 | healthcheck: |
| 17 | test: ["CMD", "pg_isready", "-U", "teldrive"] |
| 18 | interval: 10s |
| 19 | start_period: 30s |
| 20 | |
| 21 | teldrive: |
| 22 | image: ghcr.io/tgdrive/teldrive |
| 23 | container_name: teldrive |
| 24 | restart: always |
| 25 | depends_on: |
| 26 | db: |
| 27 | condition: service_healthy |
| 28 | environment: |
| 29 | - TG_APP_ID=YOUR_API_ID #https://my.telegram.org/apps |
| 30 | - TG_APP_HASH=YOUR_API_HASH #https://my.telegram.org/apps |
| 31 | - JWT_SECRET=YOUR_GENERATED_JWT_SECRET #https://teldrive-docs.pages.dev/docs/getting-started/usage |
| 32 | - DB_DATA_SOURCE=postgres://YOUR_DB_USERNAME:YOUR_DB_PASSWORD@db/teldrive?sslmode=disable |
| 33 | volumes: |
| 34 | - /volume1/docker/teldrive/config.toml:/config.toml |
| 35 | - /volume1/docker/teldrive/session.db:/session.db |
| 36 | ports: |
| 37 | - "8080:8080" |
| 38 | |
| 39 | networks: |
| 40 | postgres: |
| 41 | external: true |
| 42 | |
| 43 | volumes: |
| 44 | teldrive_db: |
| 45 |