We at NuCivic used Terra as the recommended tool for standing up a DKAN site on another server.
This was a part of our working prototype application for the 18F Agile BPA.
To get NuCivic's openFDA DKAN site running in Terra:
-
Install docker: https://docs.docker.com/installation/
-
Install docker-compose: https://docs.docker.com/compose/install/
-
Install terra: http://terra.readthedocs.org/en/latest/install/
-
Install drush: http://docs.drush.org/en/master/install/
-
Add a terra app:
$ terra app:add openfda https://github.com/NuCivic/data-openFDA.git --description="18F Agile BPA prototype" Name: openopen Description: 18F Agile BPA prototype Repo: https://github.com/NuCivic/data-openFDA.git App saved
-
Add a terra environment:
$ terra environment:add openfda local ~/Apps/openfda-local Cloning into '/home/jon/Apps/openfda-local'... * master On branch master Your branch is up-to-date with 'origin/master'. nothing to commit, working directory clean Environment saved to registry.
-
Enable your terra environment:
The first time you do this with terra, it will take some time to download the containers. Please be patient! Make sure to answer "y" to "Write a drush alias file?" so you can access your site.$ terra environment:enable openfda local DOCKER > Recreating openfdalocal_database_1... DOCKER > Recreating openfdalocal_app_1... DOCKER > Recreating openfdalocal_load_1... DOCKER > Recreating openfdalocal_drush_1... Environment enabled! Available at http://openfda.local.localhost and http://localhost:32786 Write a drush alias file to /home/jon/.drush/openfda.aliases.drushrc.php ? y Drush alias file created at /home/jon/.drush/openfda.aliases.drushrc.php Use drush @openfda.local to access the site.
-
Import the SQL database:
$ drush @openfda.local sqlc < /home/jon/Apps/openfda-local/openfda.sql
-
Login to the site:
$ drush @openfda.local uli http://localhost:32786/user/reset/1/1436287649/Nhd4aVeWaUrDW3E2ZXFcPnEAUmf50VHp8ANZjF5wFEU/login
That's it! You should now have a copy of the site running on Docker!