gazetteerhk / census_explorer

Explore Hong Kong's neighborhoods through visualizations of census data
http://gazetteer.hk
MIT License
42 stars 12 forks source link

Add data prep step in Dockerfile #62

Open debuggingfuture opened 10 years ago

debuggingfuture commented 10 years ago

the current Dockerfile is targeted to be one running the webserver, meanwhile we will need the data preparation accordingly as well. I am trying to deploy with coreOS, which don't even has python. One quick hack is to put it inside the dockerfile as well. Not sure if it make sense

drawback is connection might reset, files will got wiped if failed

# Copy scripts for running data prep
COPY scripts /srv/hk_census_explorer/scripts

RUN python /srv/hk_census_explorer/scripts/data_preparation.py

Didn't work as files are gone when intermediate containers removed. Might be better to mount to host folder and then boot into the intermediate container to run the script manually. docker run -i -t -v /home/core/census/census_explorer/backend/data:/srv/hk_census_explorer/backend/data 68c72da74f1d

hxu commented 10 years ago

Can we revert this change on your pull request until we get it working? I think a better option may be to have a data only docker container that can be built separately from the web server.

hxu commented 10 years ago

Or I can manually make the other fixes that you made for the dependencies.

debuggingfuture commented 10 years ago

Agree to have a data only container.

Sorry for coupled the commits, reverted