Basically for local start up you can just copy the .env.example
as it is
For production you should change .env:
- set BACKEND_SETTINGS_MODE to
production
- set HTTP_TEMPLATE_DIR to
/etc/nginx/templates/ssl
- change all passwords to secure
- change variables with host, ports, etc. as required
Files have to be named exactly as in ./docker/nginx/templates/ssl/[template]
docker compose -f [docker-compose_file] up --build -d
For local development you should use docker-compose.local.yml
and for production - docker-compose.yml
(or leave file argument empty)
Firstly connect to the container with Django. [container] is equal to either dev-backend
or backend
docker compose -f [docker-compose_file] exec [container] bash
Then run this inside the container
python manage.py makemigrations
After the migrations are created you have to apply them
python manage.py migrate
Then run this command to collect static files for nginx to be able to serve them
python manage.py collectstatic
Create a superuser to be able to access admin site
python manage.py createsuperuser
- Go to the
[HOST]:[PORT]/admin
(if you started a local version it should belocalhost/admin
) - Login with the credentials that you used in the previous step
- Go to the Networks tab
- Click Add Network
- Enter the links to 3 subgraphs
- Click Save
And then after some time the task are going to be run taking into the account new network
Default settings are:
- Pools APR are calculated every 1 minute
- Farmings APR are calculated evey 1 minute
To change the schedule:
- Go to admin site
- Go to Periodic tasks tab
- Choose interested task
- Change Interval Schedule in the Schedule section
- If there is no required interval setting you can add it with
+
button near it