- Install Docker Toolbox
- Run
docker-compose up
What just happened:
- Docker downloaded the necessary files to build two images: web and db
- Docker booted up one container for each image and set up a link between them so that web can talk to db
- Docker forwarded web container port 80 to host port 8000 so it can be accessed from outside
eval "$(docker-machine env default)"
docker exec -it idmapping_web_1 python manage.py migrate
docker exec -it idmapping_web_1 python manage.py createsuperuser
Follow the prompt to enter the admin info.
docker exec -it idmapping_db_1 mongo
use iam
db.createCollection('users')
db.users.insert({"ubcEduCwlPUID" : "XXXXXXXXXXXX", "displayName" : "Smith, John", "uid" : "jsmith", "ubcEduStudentNumber" : "12345678", "edx_id" : "f526523a5ca0466714082c80e2a07904", "cn" : "John Smith" })
Insert more data as needed.
To access backend, you need the host IP. Replace default
with the machine name if you are using custom machine name.
docker-machine ip default
If everything runs well, the backend will be available at http://DOCKER_HOST_IP:8000
. The following command can be use to test:
curl -u ADMIN_USERNAME:ADMIN_PASSWORD http://DOCKER_HOST_IP:8000/api/attribute
It should return a json array with all available attributes.
# For Node 17 and above
node --dns-result-order=ipv4first map.js -t TOKEN SOURCE.csv > mapped.csv
# For Node 16 and below
./map.js -t TOKEN SOURCE.csv > mapped.csv