Skip to content

Commit

Permalink
docker-compose example with postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
kzshantonu authored and divyam234 committed Nov 7, 2023
1 parent d3f42e5 commit a3f3e66
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ APP_HASH=abc
JWT_SECRET=abc
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**
Expand Down
29 changes: 29 additions & 0 deletions docker-compose.postgres.yml
Original file line number Diff line number Diff line change
@@ -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:

0 comments on commit a3f3e66

Please sign in to comment.