IPFS pinning service.
This is a Django codebase. Check out the Django docs for general technical documentation.
The Django project is martianpins
. There is one Django app,
main
Django app, with all business logic.
Create virtualenv, enable it and then install requirements:
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt
Note: This project uses pip-tools for dependencies management.
You need to create a new file named .env
in the root of this project once you cloned it.
.env
should contain the following env variables:
SECRET_KEY="thisisthesecretkey"
DATABASE_URL="postgres://postgres:postgres@127.0.0.1:5432/martianpins"
EMAIL_HOST_USER="smtp_user"
EMAIL_HOST_PASSWORD="smtp_password"
DEFAULT_FROM_EMAIL="Marvin von Martian Pins <marvin@martianpins.com>"
IPFS_NODE_URL="https://ipfs.martianpins.com"
SENTRY_DSN="https://0123456b805246cc3c200b97132114rc@sentry.io/000111"
This project uses PostgreSQL. See above on how to configure it using the .env
file.
After creating your local database, you need to apply the migrations:
python manage.py migrate
Finally, you can run the Django development server:
python manage.py runserver
Or, run the production-grade uwsgi
server:
uwsgi --ini=uwsgi.ini
Note: The
uwsgi
method does not read the.env
file, so in this case you need to set the env vars in your shell.
martianpins needs an IPFS node to work (defined in the .env
file -- see section "Environment variables").
Running an IPFS node might not be the easiest and most predictable thing, so take a look at many articles like
this one
before you attempt it.
black . && isort -y && flake8
MIT