diff --git a/compose.postgres.yml b/compose.postgres.yml index 88e3cc7..bea0132 100644 --- a/compose.postgres.yml +++ b/compose.postgres.yml @@ -11,7 +11,7 @@ services: volumes: - miniflux-db:/var/lib/postgresql/data healthcheck: - test: ["CMD", "pg_isready", "-U", "{{ env 'DB_USER' }}"] + test: ["CMD", "pg_isready", "-U", "{{ env \"DB_USER\" }}"] interval: 10s start_period: 30s networks: diff --git a/compose.yml b/compose.yml index 5fb17e8..022f43b 100644 --- a/compose.yml +++ b/compose.yml @@ -4,6 +4,7 @@ version: "3.8" services: app: image: "miniflux/miniflux:2.2.0" + command: ["-c", "/etc/miniflux/config.yml"] configs: - source: config_yml target: /etc/miniflux/config.yml @@ -11,12 +12,6 @@ services: - db_password - admin_password - secret_key - environment: - - DATABASE_URL=postgres://{{ env "DB_USER" }}:{{ secret "db_password" }}@db/{{ env "DB_NAME" }}?sslmode=disable - - RUN_MIGRATIONS=1 - - ADMIN_USERNAME={{ env "MINIFLUX_ADMIN_USERNAME" }} - - ADMIN_PASSWORD={{ secret "admin_password" }} - - BASE_URL=https://{{ env "DOMAIN" }} networks: - proxy - internal diff --git a/config.yml.tmpl b/config.yml.tmpl index 9c1ae60..b33bc96 100644 --- a/config.yml.tmpl +++ b/config.yml.tmpl @@ -1,24 +1,8 @@ -# Application -APP_NAME = {{ env "MINIFLUX_APP_NAME" }} - -# Database configuration -[database] -DB_TYPE = {{ env "MINIFLUX_DB_TYPE" }} -HOST = {{ env "MINIFLUX_DB_HOST" }} -NAME = {{ env "MINIFLUX_DB_NAME" }} -USER = {{ env "MINIFLUX_DB_USER" }} -PASSWD = {{ secret "db_password" }} - -# Server Configuration -[server] -DOMAIN = {{ env "MINIFLUX_DOMAIN" }} -PORT = {{ env "MINIFLUX_PORT" }} - -# Security -[security] -SECRET_KEY = {{ secret "secret_key" }} - -# Admin User Configuration -[admin] -USERNAME = {{ env "MINIFLUX_ADMIN_USERNAME" }} -PASSWORD = {{ secret "admin_password" }} +# Miniflux configuration -- flat KEY=VALUE, loaded via `miniflux -c` +DATABASE_URL=postgres://{{ env "DB_USER" }}:{{ secret "db_password" }}@db/{{ env "DB_NAME" }}?sslmode=disable +LISTEN_ADDR=0.0.0.0:8080 +BASE_URL=https://{{ env "DOMAIN" }} +RUN_MIGRATIONS=1 +CREATE_ADMIN=1 +ADMIN_USERNAME={{ env "MINIFLUX_ADMIN_USERNAME" }} +ADMIN_PASSWORD={{ secret "admin_password" }}