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

Create Dockerfile #103

Closed lsetiawan closed 7 years ago

lsetiawan commented 7 years ago

@ocefpaf @miguelcleon I don't have much experience creating Dockerfile, this is what I have so far, it basically just creates the image then goes into the shell.

miguelcleon commented 7 years ago

Thanks, I will give it a try tomorrow.

ocefpaf commented 7 years ago

Ultimately this will be a non-interactive image, where someone could do:

docker run -d -p 8000:8000 -v /your/local/folder/for/sqlite/database:/srv/your/image/folder/for/sqlite/database/db/ image_name

and then open the browser at localhost 8000

lsetiawan commented 7 years ago

@ocefpaf Thanks for the input. I will try to develop this some more.

miguelcleon commented 7 years ago

I'm trying this out on a fresh Ubuntu 16.04 installation. At the moment it is failing on database creation of a Django table django_admin_log I'm clearing the table and trying again.

miguelcleon commented 7 years ago

I'm getting this same problem https://github.com/miguelcleon/ODM2-Admin/issues/97#issuecomment-277282571 looks like the dockerfile should add the conda-forge channel:

conda config --add channels conda-forge --force
conda create -n ENVNAME python=2.7 --file requirements.txt --file requirements-dev.txt

or you can do all in one command with: conda create -n ENVNAME python=2.7 --file requirements.txt --file requirements-dev.txt -c conda-forge

miguelcleon commented 7 years ago

@ocefpaf > docker run -d -p 8000:8000 -v /your/local/folder/for/sqlite/database:/srv/your/image/folder/for/sqlite/database/db/ image_name

Why is sqlite referenced? @lsetiawan is installing postgresql and starting the sample db. I would think this would start the django webserver on localhost:8000 using the sample db.

miguelcleon commented 7 years ago

@lsetiawan on the suggestion of @emiliom I thought I'd ping you about the feedback I left here about the dockfile.

lsetiawan commented 7 years ago

Here's the progress I have so far: https://github.com/miguelcleon/ODM2-Admin/issues/107

lsetiawan commented 7 years ago

I am closing this one and will open a new one with an updated Dockerfile.