Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.env ignored #1160

Open
alexisfrjp opened this issue Mar 6, 2025 · 0 comments
Open

.env ignored #1160

alexisfrjp opened this issue Mar 6, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@alexisfrjp
Copy link

alexisfrjp commented Mar 6, 2025

I'm trying to run mattermost with podman-compose.

Nevertheless I get lots of errors:

[postgres]   | Error: Database is uninitialized and superuser password is not specified.
[postgres]   |        You must specify POSTGRES_PASSWORD to a non-empty value for the
[postgres]   |        superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run".
[postgres]   | 
[postgres]   |        You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all
[postgres]   |        connections without a password. This is *not* recommended.
[postgres]   | 
[postgres]   |        See PostgreSQL documentation about "trust":
[postgres]   |        https://www.postgresql.org/docs/current/auth-trust.html
[mattermost] | Error: failed to load configuration: could not create config file: open /mattermost/config/config.json: permission denied
[mattermost] | Usage:
[mattermost] |   mattermost [flags]
[mattermost] |   mattermost [command]
[mattermost] | 
[mattermost] | Available Commands:
[mattermost] |   completion  Generate the autocompletion script for the specified shell
[mattermost] |   db          Commands related to the database
[mattermost] |   export      Export data from Mattermost
[mattermost] |   help        Help about any command
[mattermost] |   import      Import data.
[mattermost] |   jobserver   Start the Mattermost job server
[mattermost] |   server      Run the Mattermost server
[mattermost] |   version     Display version information
[mattermost] | 
[mattermost] | Flags:
[mattermost] |   -c, --config string   Configuration file to use.
[mattermost] |   -h, --help            help for mattermost
[mattermost] | 
[mattermost] | Use "mattermost [command] --help" for more information about a command.
[mattermost] | 
  • podman-compose 1.3.0, the latest version completely ignores the .env
    • empty POSTGRES_PASSWORD whereas it's actually set in .env
    • the permissions: Error: failed to load configuration: could not create config file: open /mattermost/config/config.json: permission denied

In docker-compose.yml, I've added :z and label:disable

    volumes:
      - ${MATTERMOST_CONFIG_PATH}:/mattermost/config:z

and

    security_opt:
      - no-new-privileges:true
      - label:disable

Any advice? Quite annoying in 2025 podman-compose is still incompatible with docker-compose...

@alexisfrjp alexisfrjp added the bug Something isn't working label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant