mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 08:19:12 +00:00

* feat(database): connect postgres via socket * feat(config): read env var secrets from file * docs: explain env var secrets * refactor: generate postgres dsn
49 lines
1,010 B
YAML
49 lines
1,010 B
YAML
---
|
|
services:
|
|
autobrr:
|
|
# image: ghcr.io/autobrr/autobrr:develop
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: autobrr
|
|
volumes:
|
|
- ./config:/config
|
|
ports:
|
|
- "7474:7474"
|
|
restart: unless-stopped
|
|
# environment:
|
|
# AUTOBRR__POSTGRES_PASSWORD_FILE: /run/secrets/db_password
|
|
# secrets:
|
|
# - db_password
|
|
|
|
postgres:
|
|
image: postgres:12.10
|
|
container_name: postgres
|
|
volumes:
|
|
- postgres:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
environment:
|
|
- POSTGRES_USER=autobrr
|
|
- POSTGRES_PASSWORD=postgres
|
|
- POSTGRES_DB=autobrr
|
|
|
|
test_postgres:
|
|
image: postgres:12.10
|
|
container_name: autobrr_postgres_test
|
|
volumes:
|
|
- test_postgres:/var/lib/postgresql/data
|
|
ports:
|
|
- "5437:5432"
|
|
environment:
|
|
- POSTGRES_USER=testdb
|
|
- POSTGRES_PASSWORD=testdb
|
|
- POSTGRES_DB=autobrr
|
|
|
|
#secrets:
|
|
# db_password:
|
|
# file: db_password.txt
|
|
|
|
volumes:
|
|
postgres:
|
|
test_postgres:
|