This problem happened randomly, no files changed same vanilla template generated from cookie cutter.
than after trying to get the image up i get these error,
Creating network "apple_default" with the default driver
Creating apple_node_1 ...
Creating apple_postgres_1 ...
Creating apple_node_1
Creating apple_postgres_1
[1A[2K
Creating apple_postgres_1 ... [32mdone[0m
[1B[1A[2K
Creating apple_node_1 ... [32mdone[0m
[1BCreating apple_django_1 ...
Creating apple_django_1
[1A[2K
Creating apple_django_1 ... [32mdone[0m
[1BAttaching to apple_postgres_1, apple_node_1, apple_django_1
[36mpostgres_1 |[0m LOG: database system was interrupted; last known up at 2017-07-01 02:29:07 UTC
[32mdjango_1 |[0m Postgres is unavailable - sleeping
[33mnode_1 |[0m [02:30:01] Using gulpfile /app/gulpfile.js
[36mpostgres_1 |[0m LOG: database system was not properly shut down; automatic recovery in progress
[33mnode_1 |[0m [02:30:01] Starting 'default'...
[36mpostgres_1 |[0m LOG: invalid record length at 0/14EE5F0: wanted 24, got 0
[36mpostgres_1 |[0m LOG: redo is not required
[36mpostgres_1 |[0m LOG: MultiXact member wraparound protections are now enabled
[36mpostgres_1 |[0m LOG: database system is ready to accept connections
[33mnode_1 |[0m [02:30:01] Starting 'build'...
[36mpostgres_1 |[0m LOG: autovacuum launcher started
[36mpostgres_1 |[0m FATAL: no pg_hba.conf entry for host "172.19.0.4", user "apple", database "apple", SSL off
[33mnode_1 |[0m [02:30:01] Starting 'images'...
[33mnode_1 |[0m [02:30:01] Starting 'favicons-images'...
[33mnode_1 |[0m [02:30:01] Starting 'nonfavicons-images'...
[33mnode_1 |[0m [02:30:01] Starting 'scripts'...
[33mnode_1 |[0m [02:30:01] Starting 'js-scripts'...
[33mnode_1 |[0m [02:30:01] Starting 'styles'...
[33mnode_1 |[0m [02:30:01] Starting 'sass-styles'...
[33mnode_1 |[0m [02:30:01] Finished 'styles' after 1.24 ms
[33mnode_1 |[0m [02:30:01] Finished 'scripts' after 3.55 ms
[33mnode_1 |[0m [02:30:01] Finished 'images' after 12 ms
[33mnode_1 |[0m [02:30:01] Finished 'build' after 13 ms
[33mnode_1 |[0m [02:30:01] Starting 'init-browserSync'...
[33mnode_1 |[0m [02:30:01] Finished 'init-browserSync' after 8.28 ms
[33mnode_1 |[0m [02:30:01] Starting 'watch'...
[33mnode_1 |[0m [02:30:01] Finished 'watch' after 14 ms
[33mnode_1 |[0m [02:30:01] Finished 'default' after 36 ms
[33mnode_1 |[0m [02:30:01] Finished 'favicons-images' after 38 ms
[33mnode_1 |[0m [02:30:01] gulp-imagemin: Minified 0 images
[33mnode_1 |[0m [02:30:01] Finished 'nonfavicons-images' after 63 ms
[33mnode_1 |[0m [02:30:01] Finished 'js-scripts' after 60 ms
[33mnode_1 |[0m [02:30:01] Finished 'sass-styles' after 58 ms
[33mnode_1 |[0m [02:30:01] Starting 'css-styles'...
[33mnode_1 |[0m [BS] Reloading Browsers...
[33mnode_1 |[0m [02:30:01] Starting 'styles'...
[33mnode_1 |[0m [02:30:01] Starting 'sass-styles'...
[33mnode_1 |[0m [02:30:01] Finished 'styles' after 723 渭s
[33mnode_1 |[0m [BS] Copy the following snippet into your website, just before the closing </body> tag
[33mnode_1 |[0m <script id="__bs_script__">//<![CDATA[
[33mnode_1 |[0m document.write("<script async src='http://HOST:3000/browser-sync/browser-sync-client.js?v=2.18.12'><\/script>".replace("HOST", location.hostname));
[33mnode_1 |[0m //]]></script>
[33mnode_1 |[0m
[33mnode_1 |[0m [BS] Access URLs:
[33mnode_1 |[0m ----------------------------------
[33mnode_1 |[0m UI: http://localhost:3001
[33mnode_1 |[0m ----------------------------------
[33mnode_1 |[0m UI External: http://localhost:3001
[33mnode_1 |[0m ----------------------------------
[33mnode_1 |[0m [02:30:01] Finished 'css-styles' after 104 ms
[33mnode_1 |[0m [02:30:01] Finished 'sass-styles' after 21 ms
[33mnode_1 |[0m [02:30:01] Starting 'css-styles'...
[33mnode_1 |[0m [02:30:01] Finished 'css-styles' after 8 ms
[36mpostgres_1 |[0m FATAL: no pg_hba.conf entry for host "172.19.0.4", user "apple", database "apple", SSL off
[32mdjango_1 |[0m Postgres is unavailable - sleeping
[36mpostgres_1 |[0m FATAL: no pg_hba.conf entry for host "172.19.0.4", user "apple", database "apple", SSL off
[32mdjango_1 |[0m Postgres is unavailable - sleeping
[36mpostgres_1 |[0m FATAL: no pg_hba.conf entry for host "172.19.0.4", user "apple", database "apple", SSL off
[32mdjango_1 |[0m Postgres is unavailable - sleeping
[36mpostgres_1 |[0m FATAL: no pg_hba.conf entry for host "172.19.0.4", user "apple", database "apple", SSL off
[32mdjango_1 |[0m Postgres is unavailable - sleeping
[36mpostgres_1 |[0m FATAL: no pg_hba.conf entry for host "172.19.0.4", user "apple", database "apple", SSL off
[32mdjango_1 |[0m Postgres is unavailable - sleeping
[36mpostgres_1 |[0m FATAL: no pg_hba.conf entry for host "172.19.0.4", user "apple", database "apple", SSL off
[32mdjango_1 |[0m Postgres is unavailable - sleeping
[36mpostgres_1 |[0m FATAL: no pg_hba.conf entry for host "172.19.0.4", user "apple", database "apple", SSL off
[32mdjango_1 |[0m Postgres is unavailable - sleeping
[36mpostgres_1 |[0m FATAL: no pg_hba.conf entry for host "172.19.0.4", user "apple", database "apple", SSL off
[32mdjango_1 |[0m Postgres is unavailable - sleeping
[36mpostgres_1 |[0m FATAL: no pg_hba.conf entry for host "172.19.0.4", user "apple", database "apple", SSL off
[32mdjango_1 |[0m Postgres is unavailable - sleeping
[36mpostgres_1 |[0m FATAL: no pg_hba.conf entry for host "172.19.0.4", user "apple", database "apple", SSL off
[32mdjango_1 |[0m Postgres is unavailable - sleeping
[36mpostgres_1 |[0m FATAL: no pg_hba.conf entry for host "172.19.0.4", user "apple", database "apple", SSL off
[32mdjango_1 |[0m Postgres is unavailable - sleeping
[36mpostgres_1 |[0m FATAL: no pg_hba.conf entry for host "172.19.0.4", user "apple", database "apple", SSL off
[32mdjango_1 |[0m Postgres is unavailable - sleeping
[36mpostgres_1 |[0m FATAL: no pg_hba.conf entry for host "172.19.0.4", user "apple", database "apple", SSL off
[32mdjango_1 |[0m Postgres is unavailable - sleeping
[36mpostgres_1 |[0m FATAL: no pg_hba.conf entry for host "172.19.0.4", user "apple", database "apple", SSL off
[32mdjango_1 |[0m Postgres is unavailable - sleeping
[36mpostgres_1 |[0m FATAL: no pg_hba.conf entry for host "172.19.0.4", user "apple", database "apple", SSL off
[32mdjango_1 |[0m Postgres is unavailable - sleeping
[36mpostgres_1 |[0m FATAL: no pg_hba.conf entry for host "172.19.0.4", user "apple", database "apple", SSL off
[32mdjango_1 |[0m Postgres is unavailable - sleeping
Stopping apple_django_1 ...
Stopping apple_postgres_1 ...
Stopping apple_node_1 ...
Killing apple_django_1 ...
Killing apple_postgres_1 ...
Killing apple_node_1 ...
[3A[2K
Killing apple_django_1 ... [32mdone[0m
[3B[2A[2K
Killing apple_postgres_1 ... [32mdone[0m
[2B[1A[2K
Killing apple_node_1 ... [32mdone[0m
[1BGracefully stopping... (press Ctrl+C again to force)
So i entered a shell on the running postgres image and edited the pg_hba.conf file
and added 0.0.0.0/0
Than after that error went away and i was left with this error
apple role doesn't exist.. im confused, so I tried deleting the postgres image and the error persists.
This is the docker file im using
version: '2'
volumes:
postgres_data_dev: {}
postgres_backup_dev: {}
services:
postgres:
build: ./compose/postgres
volumes:
- postgres_data_dev:/var/lib/postgresql/data
- postgres_backup_dev:/backups
environment:
- POSTGRES_USER=apple
django:
build:
context: .
dockerfile: ./compose/django/Dockerfile-dev
command: /start-dev.sh
depends_on:
- postgres
- node
environment:
- POSTGRES_USER=apple
- USE_DOCKER=yes
volumes:
- .:/app
ports:
- "8000:8000"
node:
build:
context: .
dockerfile: ./compose/node/Dockerfile-dev
volumes:
- .:/app
# http://jdlm.info/articles/2016/03/06/lessons-building-node-app-docker.html
- /app/node_modules
command: "gulp"
ports:
# BrowserSync port.
- "3000:3000"
# BrowserSync UI port.
- "3001:3001"
I have an update:
I have run the command
docker run --name some-postgres -e POSTGRES_USER=apple -e POSTGRES_PASSWORD=secretpassword postgres:9.6
and that does create the role for user apple.
weird, I deleted the image that the docker file created for postgres, re-build it and now instead of giving me the error about the hba file, it just tells me that the role doesn't exist. This is the most inconsistent behavior that i have seen from docker. considering that i have made no changes on the docker file.
Ok I figured it out.
turns out i needed to prune my volumes with
docker volume prune
Most helpful comment
Ok I figured it out.
turns out i needed to prune my volumes with
docker volume prune