Open nuest opened 7 years ago
Yes, totally! 👍
I've created a first prototype, which is based on
See branch https://github.com/nuest/Ethics-app/tree/docker
Dockerfile builds and can be run with make run_dev
.
~/git/Ethics-app/docker$ make run_dev
docker run -it -e NODE_ENV=development ethics-app
Tue May 30 2017 15:58:23 GMT+0000 (UTC) HTTP-Server is listening at port undefined
{ Error: connect ECONNREFUSED 127.0.0.1:5432
at Object.exports._errnoException (util.js:1018:11)
at exports._exceptionWithHostPort (util.js:1041:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14)
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 5432 }
Tue May 30 2017 15:58:23 GMT+0000 (UTC) Could not connect to Database! Invalid Credentials or Postgres is not running
server.js
changes) to actually use defaults for missing env variablessetup.js
, but the Postgres image requires .sql
or .sh
scripts, see section "How to extend this image" at https://hub.docker.com/_/postgres/dump-init
, see https://github.com/Yelp/dumb-initI've also added build hooks for Docker Hub - if you don't want to publish the image there these could be removed again. For documentation see
Further things that could be done:
For other users and also for testing and deployment, it would be useful to prove a Dockerfile and a docker-compose configuration.
Let me know if you would welcome such a contribution.