jfrog / artifactory-docker-examples

Examples for using Artifactory Docker distribution in various environments
https://www.jfrog.com/artifactory/
Apache License 2.0
330 stars 299 forks source link

Env variables for DB no longer work. #198

Closed JakeDEvans closed 4 years ago

JakeDEvans commented 4 years ago

I'm not sure which version, but I can no longer use these env vars to create the database on v6.18 or v7.2.3

    environment:
     - DB_TYPE=postgresql
     - DB_USER=artifactory
     - DB_PASSWORD=password

instead I must manually update the system.yml file, which is then rewritten with an encrypted password.

This also makes changing postgres passwords unlikely.

JfrogPrasanna commented 4 years ago

@JakeDEvans First of all this repo is deprecated, we recommend to use wiki for the latest compose.

  1. On the database creation - the new compose has this:

    postgres:
    image: ${DOCKER_REGISTRY}/postgres:9.6.11
    container_name: postgresql
    environment:
     - POSTGRES_DB=artifactory
     - POSTGRES_USER=artifactory
     - POSTGRES_PASSWORD=password

    which creates the required user and password in the database.

  2. The same can be passed to artifactory to use these creds via system.yaml or by running config.sh, the interactive script to set the system.yaml.

Let me know if this is not making sense.

The docker compose including postgres is in the templates folder of the package.