ODM2 / CZ-Manager

CZ Manager (formerly ODM2 Admin) is an application for site level data management of environmental observations using Observation Data Model 2 (ODM2) for documentation and a detailed walkthrough see:
http://odm2.github.io/CZ-Manager
MIT License
9 stars 12 forks source link

docker file improvements #132

Open miguelcleon opened 7 years ago

miguelcleon commented 7 years ago

@lsetiawan from issue #123 The next round of improvements are to allow user to

  1. use their own settings file
  2. use uwsgi to run as production
  3. separating the database from the application

I was thinking to use the model like docker-erddap, where user attach volume within their host machine to specify where the settings files are, and we have some sort of template where we can let user to download and use... What do you think @ocefpaf ?

lsetiawan commented 7 years ago

@miguelcleon Alright, the lsetiawan/odm2admin docker image in docker hub has been updated.

miguelcleon commented 7 years ago

@lsetiawan Yup, I tried it again from scratch, seems to work great! @emiliom installation through docker is now working :+1:

emiliom commented 7 years ago

:+1: Awesome!

lsetiawan commented 7 years ago

Going back to this improvement.

Here's what I have in mind.

  1. use their own settings file

Like docker-erddap, We host the core settings file somewhere users can download in a zip. They can then unzip the settings files, edit them however they like it to be. Take advantage of the -v to basically overwrite the settings in the Docker container, they can easily change the settings there.

I think we should default the base Database to SQLite maybe??

  1. use uwsgi to run as production

Technically, probably not need this one, but I think if the container gets shutdown and turned back on, runserver doesn't automatically execute.

  1. separating the database from the application

This is definitely necessary, since Docker containers should only have one application. So a sole ODM2-Admin django application container would be a good idea. I was thinking using Docker compose to connect each pieces? Need more research on this..