mirror of
https://github.com/tgdrive/teldrive.git
synced 2025-09-09 16:09:16 +08:00
docker-compose example with postgres
This commit is contained in:
parent
d3f42e595e
commit
a3f3e66f18
2 changed files with 33 additions and 0 deletions
|
@ -83,6 +83,10 @@ APP_HASH=abc
|
||||||
JWT_SECRET=abc
|
JWT_SECRET=abc
|
||||||
DATABASE_URL=postgres://<db username>:<db password>@<db host>/<db name>
|
DATABASE_URL=postgres://<db username>:<db password>@<db host>/<db name>
|
||||||
|
|
||||||
|
```
|
||||||
|
When used with `docker-compose.postgres.yml`:
|
||||||
|
```
|
||||||
|
DATABASE_URL=postgres://teldrive:secret@db/teldrive
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Warning**
|
> **Warning**
|
||||||
|
|
29
docker-compose.postgres.yml
Normal file
29
docker-compose.postgres.yml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
services:
|
||||||
|
server:
|
||||||
|
image: ghcr.io/divyam234/teldrive/server
|
||||||
|
restart: always
|
||||||
|
container_name: teldrive
|
||||||
|
volumes:
|
||||||
|
- ./teldrive.db:/app/teldrive.db:rw
|
||||||
|
env_file: teldrive.env
|
||||||
|
ports:
|
||||||
|
- 8080:8080
|
||||||
|
db:
|
||||||
|
image: postgres:15
|
||||||
|
container_name: teldrive_db
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=teldrive
|
||||||
|
- POSTGRES_PASSWORD=secret
|
||||||
|
volumes:
|
||||||
|
- teldrive_db:/var/lib/postgresql/data
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "pg_isready", "-U", "teldrive"]
|
||||||
|
interval: 10s
|
||||||
|
start_period: 30s
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
teldrive_db:
|
||||||
|
|
Loading…
Add table
Reference in a new issue