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

modify db-init entrypoint to support user and password #1114

Merged
merged 8 commits into from
May 29, 2018

Conversation

empeje
Copy link
Contributor

@empeje empeje commented May 25, 2018

Solves #965

Add the following in your docker-compose.yml variables for db-init

environment:
  COUCHDB_USER: something
  COUCHDB_PASS: something

fi

export COUCHDB_DOMAIN=$(basename $COUCHDB_HOST)
export COUCHDB_PORT=$(cho $COUCHDB_HOST | sed -e 's,^.*:,:,g' -e 's,.*:\([0-9]*\).*,\1,g' -e 's,[^0-9],,g')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be echo

fi

export COUCHDB_DOMAIN=$(basename $COUCHDB_HOST)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is still returning couchdb:5984

@lmmrssa
Copy link
Member

lmmrssa commented May 28, 2018

Gone through code but haven't tested.

@dogi
Copy link
Member

dogi commented May 28, 2018

docker pull treehouses/planet-tags:0.1.19-db-init-password-674b3e31

@dogi
Copy link
Member

dogi commented May 28, 2018

@paulbert and @lmmrssa please aslo test ;)

@dogi dogi requested review from lmmrssa, paulbert and dogi May 28, 2018 17:53
@empeje
Copy link
Contributor Author

empeje commented May 28, 2018

I have test it myself, but don't know if it is meeting your needs or not

@paulbert
Copy link
Member

I'm getting an error trying this on a Raspberry Pi.

root@raspberrypi:~# docker-compose -f planet.yml -p planet up --build
Starting planet_couchdb_1
Recreating planet_db-init_1
Starting planet_planet_1
Attaching to planet_couchdb_1, planet_planet_1, planet_db-init_1
db-init_1  | ./docker-entrypoint.sh: line 8: syntax error: unexpected redirection

@empeje
Copy link
Contributor Author

empeje commented May 29, 2018

Let me reproduce in my side @paulbert

This should be come from the regex I did

I'm getting an error trying this on a Raspberry Pi.

root@raspberrypi:~# docker-compose -f planet.yml -p planet up --build
Starting planet_couchdb_1
Recreating planet_db-init_1
Starting planet_planet_1
Attaching to planet_couchdb_1, planet_planet_1, planet_db-init_1
db-init_1  | ./docker-entrypoint.sh: line 8: syntax error: unexpected redirection

@lmmrssa
Copy link
Member

lmmrssa commented May 29, 2018

Tested and it works for amd

Copy link
Member

@paulbert paulbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully tested on Raspberry Pi

@paulbert paulbert merged commit 7cc0a9f into master May 29, 2018
@lmmrssa lmmrssa deleted the db-init-password branch May 31, 2018 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants