This page lists contains rudimentary instructions for building the development environment with Docker Compose.
-
Clone the repo and
cd
into the directory.git clone https://github.com/opendp/dpcreator.git && cd dpcreator
-
Tell Docker to turn on the webserver and database:
docker-compose up
If major configuration changes have been made (new dependencies, etc.) then the containers will need to be rebuilt:
docker compose up --build
-
The first time you run (or anytime schema changes have been made), open a separate Terminal,
cd
into thedpcreator/
directory and manually run this migration:docker compose run server ./migrate.sh
-
Open
http://localhost:8000/
in your browser. You should see DP Creator running. -
You can login to DP Creator using the following credentials:
- Username:
dev_admin
- Password:
admin
- Username:
- Clone the repo and
cd
into the directory.git clone https://github.com/opendifferentialprivacy/dpcreator.git && cd dpcreator
- Create virtual environment:
python3 -m venv venv
- Activate virtual environment:
. venv/bin/activate
- Install requirements:
pip install -r requirements.txt
- Ensure latest version of npm:
npm install -g npm@latest
- Install Vue.js project dependencies:
cd dpcreator/client && npm install
- Run the Vue.js dev server:
cd dpcreator/client && npm run serve
- build for production:
npm run build
- build for production:
cd server/
- First time, run migrations:
python manage.py migrate
- Run Django dev server:
python manage.py runserver
- Open
http://127.0.0.1:8000/
in your browser.
- Follow steps 1-5 under Running, above
- Open
http://127.0.0.1:8000/api/
in your browser.
- Access your command-line terminal
- Issue a HTTP command for the API area of interest. This example uses curl to issue the HTTP command. Note that the port you specify should match the port in the output of step 5 under Running, above
curl http://127.0.0.1:8000/api/
curl http://127.0.0.1:8000/api/users/
(not used)
- Create a Python virtualenv to set up your environment
python3 -m venv venv
- Install PyDotPlus
pip install pydotplus
- Install Django Extensions
pip install django-extensions
- Configure your Django project to use Django Extensions in settings.py under
server/opendp-projects/
INSTALLED_APPS = (
...
'django_extensions',
...
)
- Invoke Django manager with graph models option, from the server/ subdirectory
python manage.py graph_models -a -o opendpapp_models.png
- Use a browser or viewer to view the created png file, found in the
server/
subdirectory
(This is based on an existing project by EugeneDae. See his project for original documentation.)
- Create a Python virtualenv to set up your environment
python3 -m venv venv
- Install PyDotPlus
pip install pydotplus
- Install Django Extensions
pip install django-extensions
- Configure your Django project to use Django Extensions in settings.py under
server/opendp-projects/
INSTALLED_APPS = (
...
'django_extensions',
...
)
- Invoke Django manager with graph models option, from the server/ subdirectory
python manage.py graph_models -a -o opendpapp_models.png
- Use a browser or viewer to view the created png file, found in the
server/
subdirectory
(This is based on an existing project by EugeneDae. See his project for original documentation.)