Add docs/db_postgresql.md

main
Leonid Maslakov 2 weeks ago
parent dec3b77b23
commit c77cb83675
  1. 1
      README.md
  2. 31
      docs/db_postgresql.md

@ -69,6 +69,7 @@ PS: If you want to install updates, run: `docker-compose pull && docker-compose
Read more:
- [Reverse proxy: Nginx](docs/reverse_proxy_nginx.md)
- [Database: PostgreSQL](docs/db_postgresql.md)
## Build from source code

@ -0,0 +1,31 @@
# Database: PostgreSQL
Here is an example of the basic Docker Compose config (`docker-compose.yml`):
```yaml
version: "2"
services:
lenpaste:
image: git.lcomrade.su/root/lenpaste:latest
restart: always
environment:
- LENPASTE_DB_DRIVER=postgres
- LENPASTE_DB_SOURCE=postgres://lenpaste:pass@postgres/lenpaste?sslmode=disable
volumes:
- "${PWD}/data:/data"
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
ports:
- "80:80"
depends_on:
- postgres
postgres:
image: postgres
restart: always
environment:
- PGDATA=/var/lib/postgresql/data/pgdata
- POSTGRES_USER=lenpaste
- POSTGRES_PASSWORD=pass
volumes:
- "${PWD}/data/postgres:/var/lib/postgresql/data"
```
Loading…
Cancel
Save