Skip to content

Environment POSTGRES_PASSWORD_FILE issue #2577

@accent-afk

Description

@accent-afk

This is my compose file

services:
  Nextcloud-DB:
    image: postgres:latest
    container_name: Nextcloud-DB
    user: 1000:1000
    networks:
      - Nextcloud-DB
    volumes:
      - "./Postgres-Data/:/var/lib/postgresql/"
      - "./Postgres-Secrets/:/Secrets/"
      - "/usr/share/zoneinfo/Europe/Rome:/etc/localtime:ro"
    shm_size: 128mb
    environment:
      - "POSTGRES_PASSWORD_FILE=/Secrets/.Postgres-Password"
      - "POSTGRES_USER=Nextcloud"
      - "POSTGRES_INITDB_ARGS=--data-checksums"
      - "PGDATA=/var/lib/postgresql/"

  Nextcloud:
    image: nextcloud:latest
    container_name: Nextcloud
    user: 1000:1000
    networks:
      - proxy
      - Nextcloud-DB
    volumes:
      - "./Nextcloud-Data/:/var/www/html/data/"
      - "./Nextcloud-Config/:/var/www/html/"
      - "./Postgres-Secrets/:/Secrets/"
      - "/usr/share/zoneinfo/Europe/Rome:/etc/localtime:ro"
    environment:
      - "POSTGRES_HOST=Nextcloud-DB"
      - "POSTGRES_DB=Nextcloud"
      - "POSTGRES_USER=Nextcloud"
      - "POSTGRES_PASSWORD_FILE=/Secrets/.Postgres-Password"
      - "OVERWRITEPROTOCOL=https"
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.nextcloud-rtr.rule=Host(`nextcloud.mydomain.org`)"
      - "traefik.http.routers.nextcloud-rtr.service=nextcloud-svc"
      - "traefik.http.routers.nextcloud-rtr.entrypoints=websecure"
      - "traefik.http.routers.nextcloud-rtr.tls=true"
      - "traefik.http.routers.nextcloud-rtr.tls.certresolver=le"

      - "traefik.http.services.nextcloud-svc.loadbalancer.server.port=80"

networks:
 proxy:
   name: proxy
   external: true
 Nextcloud-DB:
   name: Nextcloud-DB
   external: false

When i try to start this container in the nextcloud web interface i recive the warning in the photo

Image

but if in place of POSTGRES_PASSWORD_FILE i use POSTGRES_PASSWORD=1234 i recive

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions