Skip to content
This repository has been archived by the owner on Dec 23, 2021. It is now read-only.

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SvenDowideit
Copy link

@SvenDowideit SvenDowideit commented Mar 6, 2018

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 datproject/datbase:latest doesn't start #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 :/

Signed-off-by: Sven Dowideit <sven.dowideit@csiro.au>
@SvenDowideit
Copy link
Author

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
Copy link
Author

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..

Copy link
Contributor

@joehand joehand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! A few changes/questions.

- 25:25
expose:
- 80
- 8888:80
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 8888 here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah - no good reason I guess

@@ -55,7 +55,6 @@
"devDependencies": {
"dat-node": "^3.5.0",
"marked": "^0.3.6",
"nodemon": "^1.10.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we'd like to keep this in devDependencies b/c its pretty big dependency. Why do you want to move it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved it entirely because the existing Dockerfile and docker image (with the CMD as is) fail to start without it.

@@ -0,0 +1,41 @@
version: '3.4'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give a tldr on this file or how to use it (maybe add to readme)? Not familiar with docker-swarm.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

datproject/datbase:latest doesn't start
2 participants