dat-ecosystem-archive / datBase

Open data sharing powered by Dat [ DEPRECATED - More info on active projects and modules at https://dat-ecosystem.org/ ]
http://datbase.org
244 stars 32 forks source link

Docker things I noticed trying to run my own dat registry #628

Open SvenDowideit opened 6 years ago

SvenDowideit commented 6 years ago

so this has a bunch of things:

  1. I removed port 25, as that implies datBase is an SMTP server - if its only sending emails, it shouldn't need to listen to port 25
  2. I re-used some of the ENV vars so constants are only set once
  3. added the defaul.js config, so the image on the hub can "work" - and then users would customise it.
  4. moved nodemon to the prod dependencies - closes #627
  5. added a docker-swarm-yml, which should go some way to showing how you could run datBase in production.

however, it doesn't work - i can't run dat register or dat login against it - both fail with cannot POST to /register (or /publish/login) I can register a new user via the web UI.

I presume I need to set something else up?

@joehand

I also get

dat_datbase.1.gdmqbxsykwh5@TOWER-SL    | %ccolor: #747369; ⚠️ %c03:52:20 %ccolor: #cc99cc; %cchoo color: #ffcc66; log:warn color: #d3d0c8; Could not set item to localStorage choo-hypertracker
dat_datbase.1.gdmqbxsykwh5@TOWER-SL    | %ccolor: #747369; ✨ %c03:52:20 %ccolor: #cc99cc; choo color: #99cc99; render
dat_datbase.1.gdmqbxsykwh5@TOWER-SL    | Tue, 06 Mar 2018 03:52:20 GMT dat-registry {"data":"data","mixpanel":"notakey","township":{"secret":"very very not secret","db":"data/township.db"},"email":{"from":"hi@example.com"},"db":{"dialect":"sqlite3","connection":{"filename":"data/sqlite.db"},"useNullAsDefault":true},"whitelist":false,"archiver":"data/archiver"}
dat_datbase.1.gdmqbxsykwh5@TOWER-SL    | Tue, 06 Mar 2018 03:52:20 GMT dat-registry setup mailer undefined
dat_datbase.1.gdmqbxsykwh5@TOWER-SL    | {"time":"2018-03-06T03:52:21.195Z","hostname":"a7399e72eb04","pid":39,"level":"info","name":"/usr/src/app/server/cli.js","message":"listening","port":80,"env":"/usr/local/bin/node"}

in the logs - which is :/

SvenDowideit commented 6 years ago

mmm, or another failure trying to register (with nothing in the container log output):

dat register
Welcome to dat program!
Create a new account with a Dat registry.

Dat registry:  (datbase.org) datbase.tower.ona.im
Username:  test
Email:  test@home.org.au
Password:  ****

unable to verify the first certificate
SvenDowideit commented 6 years ago

The resulting web site is obviously the datbase.org one - so I'll need to customise - but at this point, I really just want to get started..