kengz / aiva

AIVA (A.I. Virtual Assistant): General-purpose virtual assistant for developers.
http://kengz.me/aiva/
MIT License
822 stars 595 forks source link

Some Dockerization #24

Closed dschaper closed 7 years ago

dschaper commented 7 years ago

The existing Dockerfile could use a little bit of Dockerization. This still does not solve the issue with postgresql not working with npm run start on build, but it's a start. You can run bash into the last image, start postgres and psql -U postgres works. But.... This really should be a composed docker. NodeJS in one container, nginx in another container and postgresql in a 3rd. Working on that part, and possibly moving to another not-as-heavy base image for everything to run in.

kengz commented 7 years ago

Thanks for the PR! Yeah the Dockerfile is damn out of date compared to the current master. Waiting for the cgkb branch to be done to get back into Docker again.

dschaper commented 7 years ago

It would be nice to have, hubot just doesn't cut it anymore. Look forward to getting AIVA up and running!

kengz commented 7 years ago

Awesome. Is that all the changes?

dschaper commented 7 years ago

Yes, for now, still not fully functional, but it's a good framework and cuts the full image down to 700MB for now with Ubuntu16.04

dschaper commented 7 years ago

Looking at composing a few containers but doing it with minimal need to change the node or anything on your end of development.

dschaper commented 7 years ago

https://hub.docker.com/r/zabbix/zabbix-server-pgsql/ May be of interest in the scheme, noting their way of creating the psql databases at build time. Not sure if that would conflict with non-Docker installs though, can sequalize handle an existing database and username if provided in the db.json?

kengz commented 7 years ago

yep. In face it requires the database to exist in the first place (I use some bash for that) before running sequelize.

Just opened up a new issue for this, let's move to #26