Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Fix ability to change database credentials #72

Closed
diego-G opened this issue Feb 26, 2018 · 2 comments
Closed

Fix ability to change database credentials #72

diego-G opened this issue Feb 26, 2018 · 2 comments

Comments

@diego-G
Copy link
Contributor

diego-G commented Feb 26, 2018

Expected behavior

A delegate is able to change database credentials from default.

Actual behavior

The Lisk Docker image overwrites the work done by the entrypoint. Even if changing by hand config.json, db.env and docker-compose.yml, db password gets overwritten when we restart the container.

Which version(s) does this affect? (Environment, OS, etc...)

0.9.11+

@fchavant
Copy link
Contributor

fchavant commented Mar 6, 2018

@diego-G this problem will disappear after #75 is merged and you will be able to set any password in docker-compose.yml like so:

git diff docker-compose.yml
diff --git a/examples/testnet/docker-compose.yml b/examples/testnet/docker-compose.yml
index dddd85c..d2cc8c8 100644
--- a/examples/testnet/docker-compose.yml
+++ b/examples/testnet/docker-compose.yml
@@ -13,6 +13,8 @@ services:
       - db
     command: ["/home/lisk/wait-for-it.sh", "db:5432", "--", "/home/lisk/run.sh"]
     restart: on-failure
+    environment:
+      - LISK_CONFIG_DATABASE_PASSWORD=foobar

   db:
     image: postgres:9.6-alpine
@@ -23,7 +25,7 @@ services:
     restart: on-failure
     environment:
       - POSTGRES_DB=lisk_test
-      - POSTGRES_PASSWORD=password
+      - POSTGRES_PASSWORD=foobar
       - POSTGRES_USER=lisk

   task:
@@ -32,7 +34,7 @@ services:
       - lisk-test
     environment:
       - PGUSER=lisk
-      - PGPASSWORD=password
+      - PGPASSWORD=foobar
       - PGDATABASE=lisk_test
       - PGHOST=db
     command: /bin/true
make
docker-compose logs

@fchavant
Copy link
Contributor

fchavant commented Mar 22, 2018

Fixed by #75

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants