-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from datahuborg/feature/openid-connect
Let users authenticate with MIT OpenID Connect and social logins
- Loading branch information
Showing
181 changed files
with
6,111 additions
and
27,559 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ engines: | |
enabled: true | ||
radon: | ||
enabled: true | ||
config: | ||
threshold: 'C' | ||
fixme: | ||
enabled: true | ||
checks: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
FILE="/tmp/backup.gz" | ||
echo "Backing up all databases from db container into $FILE on host machine..." | ||
if [ ! -f $FILE ]; then | ||
(set -x; | ||
docker run --rm -t --link db:db -v /tmp:/tmp datahuborg/postgres \ | ||
/bin/bash -c \ | ||
"pg_dumpall --clean --if-exists --host db --username postgres | gzip > $FILE") | ||
else | ||
echo "$FILE already exists. Cancelling backup." | ||
fi | ||
echo "Done." |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
FILE="/tmp/$1-backup.gz" | ||
echo "Backing up database $1 from db container into $FILE on host machine..." | ||
if [ ! -f $FILE ]; then | ||
(set -x; | ||
docker run --rm -t --link db:db -v /tmp:/tmp datahuborg/postgres \ | ||
/bin/bash -c \ | ||
"pg_dump --clean --create --if-exists --host db --username postgres -d $1 | gzip > $FILE") | ||
else | ||
echo "$FILE already exists. Cancelling backup." | ||
fi | ||
echo "Done." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
#!/bin/bash | ||
docker run --rm -t --volumes-from app datahuborg/datahub /bin/bash -c "make html && python src/manage.py collectstatic --noinput" | ||
|
||
(set -x; docker run --rm -t \ | ||
--volumes-from app \ | ||
datahuborg/datahub \ | ||
/bin/bash -c \ | ||
"make html && python src/manage.py collectstatic --noinput") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
cd /datahub/src | ||
set -x | ||
python manage.py test functional_tests.test_login_auth | ||
python manage.py test functional_tests.test_layout_and_styling | ||
python manage.py test functional_tests.test_database_capabilities |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,27 @@ | ||
#!/bin/bash | ||
|
||
echo "Starting phantomjs container..." | ||
if ! `docker inspect -f {{.State.Running}} phantomjs`; then | ||
docker start phantomjs | ||
(set -x; docker start phantomjs) | ||
echo "phantomjs started." | ||
else | ||
echo "phantomjs already running. Skipping." | ||
fi | ||
echo "Creating testing container..." | ||
docker run -ti --rm \ | ||
--link db:db \ | ||
--link phantomjs:phantomjs \ | ||
echo "Stopping app container..." | ||
(set -x; docker stop app) | ||
echo "Spinning up test app container..." | ||
echo "*** Run unit tests with 'sh /datahub/provisions/docker/run-unit-tests.sh'." | ||
echo "*** Run functional tests with 'sh /datahub/provisions/docker/run-functional-tests.sh'." | ||
echo "*** Run specific tests with commands like 'python manage.py test core'." | ||
echo "*** Run a debuggable server with 'python manage.py runserver 0.0.0.0:8000'." | ||
(set -x; docker run -ti --rm \ | ||
-e "DATAHUB_DOCKER_TESTING=true" \ | ||
-e "DJANGO_LIVE_TEST_SERVER_ADDRESS=0.0.0.0:8000" \ | ||
--volumes-from logs \ | ||
--volumes-from data \ | ||
--net=datahub_dev \ | ||
-v /vagrant:/datahub \ | ||
datahuborg/datahub /bin/bash | ||
-w /datahub/src \ | ||
datahuborg/datahub /bin/bash) | ||
echo "Bringing back app container..." | ||
(set -x; docker start app) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
cd /datahub/src | ||
set -x | ||
python manage.py test inventory | ||
python manage.py test www | ||
python manage.py test account | ||
python manage.py test browser | ||
python manage.py test core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
# Make sure the app container (www-data) and db container (postgres) are able | ||
# to create and delete files and directories in the shared data volume | ||
# (/user_data). | ||
gosu root chown -R www-data:www-data /user_data/ | ||
gosu root chmod -R 3775 /user_data/ | ||
gosu root setfacl -d -R -m g:www-data:rwx /user_data | ||
gosu root setfacl -d -R -m g:postgres:rwx /user_data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
default_app_config = 'account.config.DataHubAccountConfig' |
Oops, something went wrong.