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

Repair CI by setting POSTGRES_PASSWORD env variable #209

Merged

Conversation

vasayxtx
Copy link
Contributor

Seems like CI is broken now, it fails when I try to run this locally:

$ circleci local execute --job build --config .circleci/config.yml

...
Error: Database is uninitialized and superuser password is not specified.  
       You must specify POSTGRES_PASSWORD for the superuser. Use                                                                                                                                                
       "-e POSTGRES_PASSWORD=password" to set it in "docker run".                                                                                                                                               
                                                                                                                                     
       You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections                                                                                                                                
       without a password. This is *not* recommended. See PostgreSQL                                                                                                                                            
       documentation about "trust":                                                                                                     
       https://www.postgresql.org/docs/current/auth-trust.html                                                                            
Error:                                                                                                                                                                                                          
Exited with code 1

Step failed
...

====>> Wait for db                                                                                         
  #!/bin/bash -eo pipefail                                                                                 
dockerize -wait tcp://127.0.0.1:3306 -wait tcp://127.0.0.1:5432 -timeout 1m                                
2020/02/17 11:38:43 Waiting for host: 127.0.0.1:3306                                                       
2020/02/17 11:38:43 Waiting for host: 127.0.0.1:5432                                                       
2020/02/17 11:38:43 Problem with dial: dial tcp 127.0.0.1:3306: getsockopt: connection refused. Sleeping 5s
...
2020/02/17 11:38:53 Problem with dial: dial tcp 127.0.0.1:5432: getsockopt: connection refused. Sleeping 5s
2020/02/17 11:38:53 Connected to tcp://127.0.0.1:3306
...
2020/02/17 11:39:38 Problem with dial: dial tcp 127.0.0.1:5432: getsockopt: connection refused. Sleeping 5s
2020/02/17 11:39:43 Timeout after 1m0s waiting on dependencies to become available: [tcp://127.0.0.1:3306 tcp://127.0.0.1:5432]
Error:
Exited with code exit status 1

Step failed
Error: runner failed (exited with 101)
Task failed
Step canceled
Error: task failed

Maintainer of postgres:11-alpine docker image decided to make it more secure by default, so now either the POSTGRES_PASSWORD should be set, or POSTGRES_HOST_AUTH_METHOD should have trust value.

More info can be found here: docker-library/postgres#681 (comment)

Commit in docker-library/postgres: docker-library/postgres@42ce743

@vasayxtx vasayxtx changed the title Repair CI setting POSTGRESS_PASSWORD env varbiable Repair CI setting POSTGRES_PASSWORD env varbiable Feb 17, 2020
@vasayxtx vasayxtx force-pushed the repair-ci-setting-postgress-password branch from 0bb2bf0 to 2851b69 Compare February 17, 2020 12:11
Maintainer of postgres:11-alpine docker image decided to make it more secure by default, so now either the POSTGRES_PASSWORD should be set, or POSTGRES_HOST_AUTH_METHOD should have "trust" value.
@vasayxtx vasayxtx changed the title Repair CI setting POSTGRES_PASSWORD env varbiable Repair CI setting POSTGRES_PASSWORD env variable Feb 17, 2020
@vasayxtx vasayxtx force-pushed the repair-ci-setting-postgress-password branch from 2851b69 to 4a971b0 Compare February 17, 2020 12:15
@vasayxtx vasayxtx changed the title Repair CI setting POSTGRES_PASSWORD env variable Repair CI by setting POSTGRES_PASSWORD env variable Feb 17, 2020
@taylorchu taylorchu merged commit f487ccf into gocraft:master Feb 18, 2020
@taylorchu
Copy link
Contributor

thanks!

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.

2 participants