• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

sirodoht/martianpins: Self hosted IPFS pinning service.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

sirodoht/martianpins

开源软件地址:

https://github.com/sirodoht/martianpins

开源编程语言:

Python 61.6%

开源软件介绍:

martianpins

IPFS pinning service.

screenshot

Development

This is a Django codebase. Check out the Django docs for general technical documentation.

Structure

The Django project is martianpins. There is one Django app, main Django app, with all business logic.

Dependencies

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.

Environment variables

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:[email protected]:5432/martianpins"
EMAIL_HOST_USER="smtp_user"
EMAIL_HOST_PASSWORD="smtp_password"
DEFAULT_FROM_EMAIL="Marvin von Martian Pins <[email protected]>"
IPFS_NODE_URL="https://ipfs.martianpins.com"
SENTRY_DSN="https://[email protected]/000111"

Database

This project uses PostgreSQL. See above on how to configure it using the .env file.

How to: PostgreSQL on Docker

After creating your local database, you need to apply the migrations:

python manage.py migrate

Serve

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.

Deployment

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.

Code linting & formatting

black . && isort -y && flake8

License

MIT




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap