DocumentCloud · Squarelet · MuckRock · DocumentCloud-Frontend
Analyze, Annotate, Publish. Turn documents into data.
You must first have these set up and ready to go:
*Note the front end will not be functional until you complete the current install.
git clone git@github.com:MuckRock/documentcloud.git
cd documentcloud
python initialize_dotenvs.py
This will create files with the environment variables needed to run the development environment.api.dev.documentcloud.org
and minio.documentcloud.org
to point to localhost - echo "127.0.0.1 api.dev.documentcloud.org minio.documentcloud.org" | sudo tee -a /etc/hosts
export COMPOSE_FILE=local.yml;
in any of your command line sessions so that docker compose finds the configuration.docker compose up
.api.dev.documentcloud.org/
into your browser - you should see the Django API root page. Note that api
is before dev
in this service URL..envs/.local/.django
set the following environment variables:SQUARELET_KEY
to the value of Client ID from the Squarelet ClientSQUARELET_SECRET
to the value of Client SECRET from the Squarelet ClientJWT_VERIFYING_KEY
by opening the Squarelet Django shell using inv shell
and copying the settings.SIMPLE_JWT['VERIFYING_KEY']
(remove the leading b'
and the trailing '
, leave the \n
portions as-is)docker compose down
followed by docker compose up
) each time you change a .django
file for it to take effect.SQUARELET_WHITELIST_VERIFIED_JOURNALISTS=True
environment variable makes it so only verified journalists can log into DocumentCloud.inv shell
in the DocumentCloud folder and use these commands (no indent):
tempUser = User.objects.all()[0]
tempUser.is_superuser = True
tempUser.save()
tempUser.is_staff = True
tempUser.save()
/tipofday/
. It can be blank. Do not prefix the URL with /pages/
. Specifying the Site
as example.com
is alright..django
file for these variables:MINIO_URL
with a browser, likely at this address, and login with the minio MINIO_ACCESS_KEY
and MINIO_SECRET_KEY
documents
inv test
.path
switch like so: inv test --path documentcloud/documents
.
--path
if you only want to run the tests in that file.