FastAPI+MongoDB based web service for storing partitioned anomalous light curves.
To run the anomaly base, the following steps should be performed:
- Place the
secret_data.inifile with this content in the project directory (on the same level asdocker-compose.yml):
[NOTIF]
master_pass = <YOUR_TG_API_TOKEN>
and the .env file with the following content:
MONGO_INITDB_ROOT_USERNAME=<YOUR_MONGO_USERNAME>
MONGO_INITDB_ROOT_PASSWORD=<YOUR_MONGO_PASSWORD>
DATABASE_URL=mongodb://<MONGO_USERNAME>:<MONGO_USERNAME>@database:27017/
SECRET_KEY=<YOUR_SECRET_KEY>
TG_TOKEN=<YOUR_TG_API_TOKEN>
(I realize that duplicating TG_TOKEN -- this is strange, and will fix it in the future)
- Create a certs folder (on the same level as the
docker-compose.ymlfile), save the SSL certificates in it; - In the
docker-compose.ymlfile, replace the paths/home/vps/web_data,/home/vps/mongodata,/home/vps/mongobackupsand/home/vps/anomaly_base/mongo_backup.shwith your own. - Replace the domain name in this line with your own: here and here.
- Execute the commands in the project directory:
docker-compose build
docker-compose up