- openssl
- Python 3
- Python3-pip
- uwsgi
openssl ecparam -genkey -name prime256v1 -noout -out private.pem
{
"region": 440,
"base_url": "https://en.keiji.dev/diagnosis_keys/",
"db_uri": "sqlite:////tmp/en/test.db",
"base_path": "/tmp/en",
"export-generate_bin_path": "/home/ubuntu/en-calibration-server/exposure-notifications-server/tools/export-generate/export-generate",
"signing_key_path": "/home/ubuntu/private.pem"
}
pip3 install -r server/requirements.txt
cd server
CONFIG_PATH=sample/config.json \
uwsgi --ini uwsgi.ini
curl -T sample/diagnosis_keys.json https://en.keiji.dev/diagnosis_keys/012345/diagnosis-keys.json
12 diagnosis_keys have been added.
CONFIG_PATH=sample/config.json \
python3 generate_diagnosis_keys.py
12 new diagnosis-keys have been found.
2021/07/18 15:17:28 Using TEKs provided in: /tmp/en/012345/diagnosis_keys-mpdysnkb.json
2021/07/18 15:17:28 number of batches: 1
2021/07/18 15:17:28 Creating /tmp/en/012345/diagnosis_keys-mpdysnkb-12-records-1-of-1.zip
curl https://en.keiji.dev/diagnosis_keys/012345/list.json
[
{
"region": 440,
"url": "https://en.keiji.dev/diagnosis_keys/012345/diagnosis_keys-mpdysnkb-12-records-1-of-1.zip",
"created": 1626589048
}
]
curl -O https://en.keiji.dev/diagnosis_keys/012345/diagnosis_keys-mpdysnkb-12-records-1-of-1.zip
# m h dom mon dow command
*/10 * * * * ~/en-calibration-server/server/sample/generate_diagnosis_keys.sh
curl -T sample/exposure_data.json https://en.keiji.dev/exposure_data/012345/
{
...
"file_name": "0d0c3498c226102ce2ac6581cf853adaef1b5b89ee42f8e0b61c4a392ae1b009.json"
}
curl https://en.keiji.dev/exposure_data/012348/list.json
[
{
"url": "https://en.keiji.dev/exposure_data/012348/0d0c3498c226102ce2ac6581cf853adaef1b5b89ee42f8e0b61c4a392ae1b009.json",
"created": 1632552825
}
]
curl https://en.keiji.dev/exposure_data/012348/0d0c3498c226102ce2ac6581cf853adaef1b5b89ee42f8e0b61c4a392ae1b009.json
{
...
"file_name": "0d0c3498c226102ce2ac6581cf853adaef1b5b89ee42f8e0b61c4a392ae1b009.json"
}