Fixed access to postgres database not working for non-'miniflux' usernames. The database created is the same name as the username while the miniflux container would still look for the standard database. This fixes it to be able to take any username and corresponding database.
48 lines
1.5 KiB
Django/Jinja
48 lines
1.5 KiB
Django/Jinja
version: '3.7'
|
|
|
|
services:
|
|
app:
|
|
image: {{ stack_image }}:{{ miniflux_version }}
|
|
networks:
|
|
- "{{ docker_swarm_public_network_name }}"
|
|
- backend
|
|
healthcheck:
|
|
test: ["CMD", "/usr/bin/miniflux", "-healthcheck", "auto"]
|
|
interval: 1m
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 1m
|
|
environment:
|
|
- DATABASE_URL=postgres://{{ miniflux_postgres_user }}:{{ miniflux_postgres_password }}@db/{{ miniflux_postgres_user }}?sslmode=disable
|
|
- RUN_MIGRATIONS=1
|
|
- CREATE_ADMIN=1
|
|
- ADMIN_USERNAME={{ miniflux_admin_username }}
|
|
- ADMIN_PASSWORD={{ miniflux_admin_password }}
|
|
- DEBUG=1
|
|
{% if server_domain is not undefined and not none %}
|
|
- "BASE_URL={{ (miniflux_use_https == True) | ternary('https', 'http') }}://{{ (subdomain_alias is not undefined and not none) | ternary(subdomain_alias, stack_name) }}.{{server_domain}}"
|
|
{% else %}
|
|
- "BASE_URL={{ (miniflux_use_https == True) | ternary('https', 'http') }}://localhost/{{ (subdomain_alias is not undefined and not none) | ternary(subdomain_alias, stack_name) }}"
|
|
{% endif %}
|
|
|
|
db:
|
|
image: postgres:11
|
|
networks:
|
|
- backend
|
|
healthcheck:
|
|
test: ["CMD", "pg_isready", "-U", "miniflux"]
|
|
interval: 1m
|
|
start_period: 30s
|
|
environment:
|
|
- POSTGRES_USER={{ miniflux_postgres_user }}
|
|
- POSTGRES_PASSWORD={{ miniflux_postgres_password }}
|
|
volumes:
|
|
- db:/var/lib/postgresql/data
|
|
|
|
volumes:
|
|
db:
|
|
|
|
networks:
|
|
"{{ docker_swarm_public_network_name }}":
|
|
external: true
|
|
backend:
|