Split postgres config
This commit is contained in:
parent
caa94f4d69
commit
5f2ce168c4
|
@ -6,8 +6,9 @@ export LETS_ENCRYPT_ENV=production
|
||||||
# Selfoss options, see https://www.selfoss.aditu.de/#configuration
|
# Selfoss options, see https://www.selfoss.aditu.de/#configuration
|
||||||
|
|
||||||
# Options are sqlite, pgsql, mysql; currently sqlite and pgsql are supported
|
# Options are sqlite, pgsql, mysql; currently sqlite and pgsql are supported
|
||||||
# If you choose pgsql
|
# If you choose pgsql, uncomment the COMPOSE_FILE line
|
||||||
export SELFOSS_DB_TYPE=sqlite
|
export SELFOSS_DB_TYPE=sqlite
|
||||||
|
#export COMPOSE_FILE="compose.yml:compose.postgres.yml"
|
||||||
|
|
||||||
# Set these two variables to enable authentication
|
# Set these two variables to enable authentication
|
||||||
export SELFOSS_USERNAME=
|
export SELFOSS_USERNAME=
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
---
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: "postgres:9.6.5"
|
||||||
|
volumes:
|
||||||
|
- "postgres:/var/lib/postgresql/data"
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: selfoss
|
||||||
|
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
|
||||||
|
POSTGRES_DB: selfoss
|
||||||
|
secrets:
|
||||||
|
- db_password
|
||||||
|
|
||||||
|
selfoss:
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
secrets:
|
||||||
|
- db_password
|
||||||
|
environment:
|
||||||
|
- SELFOSS_DB_HOST=postgres
|
||||||
|
- SELFOSS_DB_NAME=selfoss
|
||||||
|
- SELFOSS_DB_USERNAME=selfoss
|
||||||
|
- SELFOSS_DB_PASSWORD_FILE=/run/secrets/db_password
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
postgres:
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
db_password:
|
||||||
|
external: true
|
||||||
|
name: ${STACK_NAME}_db_password_${DB_PASSWORD_VERSION}
|
29
compose.yml
29
compose.yml
|
@ -2,19 +2,6 @@
|
||||||
version: '3.8'
|
version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
|
||||||
image: "postgres:9.6.5"
|
|
||||||
volumes:
|
|
||||||
- "postgres:/var/lib/postgresql/data"
|
|
||||||
networks:
|
|
||||||
- internal
|
|
||||||
environment:
|
|
||||||
POSTGRES_USER: selfoss
|
|
||||||
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
|
|
||||||
POSTGRES_DB: selfoss
|
|
||||||
secrets:
|
|
||||||
- db_password
|
|
||||||
|
|
||||||
selfoss:
|
selfoss:
|
||||||
image: akito13/selfoss
|
image: akito13/selfoss
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -41,12 +28,7 @@ services:
|
||||||
#- SELFOSS_PASSWORD_FILE=/run/secrets/selfoss_password
|
#- SELFOSS_PASSWORD_FILE=/run/secrets/selfoss_password
|
||||||
- SELFOSS_DB_TYPE
|
- SELFOSS_DB_TYPE
|
||||||
- SELFOSS_LOGGER_LEVEL
|
- SELFOSS_LOGGER_LEVEL
|
||||||
- SELFOSS_DB_HOST=postgres
|
#secrets:
|
||||||
- SELFOSS_DB_NAME=selfoss
|
|
||||||
- SELFOSS_DB_USERNAME=selfoss
|
|
||||||
- SELFOSS_DB_PASSWORD_FILE=/run/secrets/db_password
|
|
||||||
secrets:
|
|
||||||
- db_password
|
|
||||||
# TODO 3wc: see above note about issue #3
|
# TODO 3wc: see above note about issue #3
|
||||||
#- selfoss_password
|
#- selfoss_password
|
||||||
entrypoint: /docker-entrypoint.sh
|
entrypoint: /docker-entrypoint.sh
|
||||||
|
@ -56,9 +38,6 @@ services:
|
||||||
mode: 0555
|
mode: 0555
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- proxy
|
||||||
- internal
|
|
||||||
depends_on:
|
|
||||||
- postgres
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "-qO", "-", "http://localhost:8888"]
|
test: ["CMD", "wget", "-qO", "-", "http://localhost:8888"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
|
@ -73,12 +52,8 @@ networks:
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
selfoss:
|
selfoss:
|
||||||
postgres:
|
|
||||||
|
|
||||||
secrets:
|
#secrets:
|
||||||
db_password:
|
|
||||||
external: true
|
|
||||||
name: ${STACK_NAME}_db_password_${DB_PASSWORD_VERSION}
|
|
||||||
# TODO 3wc: see above note about issue #3
|
# TODO 3wc: see above note about issue #3
|
||||||
#selfoss_password:
|
#selfoss_password:
|
||||||
# external: true
|
# external: true
|
||||||
|
|
Loading…
Reference in New Issue