-
Notifications
You must be signed in to change notification settings - Fork 4
Home
This app requires Auth0 to provides Single sign-on (SSO) that allow users to log in with single ID and password such as Gmail or other variety of available providers, and a diverse set of user-friendly tools the developer will really like.
Environment Setup:
export AUTH0_DOMAIN="string_url"
export AUTH0_CLIENT_ID="string"
export AUTH0_SECRET="string"
export AUTH0_AUDIENCE="string"
When running the test, any upload and download activities will not uploaded directly as Storage object (offered by Google Cloud). It stored inside ./backend/tmp/fake-storage
Environment Setup:
export GOOGLE_APPLICATION_CREDENTIALS=path_to_service_account.json
Environment Setup:
export MAILJET_SECRET="string"
export MAILJET_APIKEY="string"
Now you have all the required environment ready, then run the App using:
export INSTANCE_NAME=<project-name>
docker-compose up -d
To stop:
docker-compose down
Reset the app:
docker-compose down -v
The app should be running at: localhost:3000. Any endpoints with prefix
-
/api
is redirected to localhost:5000 -
/worker
is for worker service in localhost:5001 -
/config.js
is a static config that redirected to localhost:5001/config.js
see: setupProxy.js
Before you seed the baseline data, please make sure that you have all the required file in the following structure:
Folder Path: /backend/source/
/backend/source.
└── project-name
├── config.js
├── config.min.js
├── data
│ └── organisation.csv
├── forms
│ ├── 01-clts.json
│ ├── 02-health.json
│ ├── 03-hh.json
│ ├── 04-school.json
│ └── 05-wp.json
└── topojson.js
Note that project-name should be same as INSTANCE_NAME that you exported
Assuming that you have topojson.js inside ./backend/source/{project_name}
folder you will be able to run.
docker-compose exec backend python -m seeder.administration
To seed organisation, you need to have organisation.csv inside ./backend/source/{project_name}/data
folder you will be able to run.
docker-compose exec backend python -m seeder.organisation
Note you wont be able to use some of the backend API if you haven't confirmed your email address with Auth0 tenant which you will received once your account is registered. You also have to perform Administration and Organisation Seeder first
docker-compose exec backend python -m seeder.admin [email protected] "Your Name" Akvo
docker-compose exec backend python -m seeder.user <number_of_user> Akvo
Assuming that you have id-form_name.json inside ./backend/source/{project_name}/forms/
folder you should be able to run.
docker-compose exec backend python -m seeder.form
Assuming that you have baseline.xlsx inside ./backend/source
folder you should be able to run.
docker-compose exec backend python -m seeder.datapoint [email protected]
If you wish to run all the necessary seeder, you could also run
docker-compose exec backend ./seed.sh [email protected] "Your Name" Akvo
docker-compose exec backend ./test.sh
export CI_COMMIT='local'
./ci/build.sh
This will generate two docker images with prefix eu.gcr.io/akvo-lumen/wai-sdg-portal
for backend and frontend
docker-compose -f docker-compose.yml -f docker-compose.ci.yml up -d
Then visit: localhost:8080. Any endpoints with prefix
-
/api
is redirected to backend API: localhost:5000 -
/worker
is redirected to service worker: localhost:5001 -
/config.js
is a static config that redirected to localhost:5001/config.js inside the network container
see:
- nginx config
- mainnetwork container setup
For further information about the file formats please contact [email protected]