{"id":22916820,"url":"https://github.com/chanmo/django_boilerplate","last_synced_at":"2025-04-01T12:44:39.259Z","repository":{"id":78745271,"uuid":"200329412","full_name":"ChanMo/django_boilerplate","owner":"ChanMo","description":"Django + Docker","archived":false,"fork":false,"pushed_at":"2019-11-13T06:15:35.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T17:49:12.707Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChanMo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-03T04:01:55.000Z","updated_at":"2019-11-13T06:15:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"f14f0b71-a6ac-4f71-a6d6-40aff501fcb4","html_url":"https://github.com/ChanMo/django_boilerplate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChanMo%2Fdjango_boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChanMo%2Fdjango_boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChanMo%2Fdjango_boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChanMo%2Fdjango_boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChanMo","download_url":"https://codeload.github.com/ChanMo/django_boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246642190,"owners_count":20810559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-14T06:14:45.517Z","updated_at":"2025-04-01T12:44:39.250Z","avatar_url":"https://github.com/ChanMo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django Boilerplate\n\nDjango项目的简易Docker模板\n\n## 包含\n\n* django2.2\n* postgres\n* gunicorn\n* redis\n\n## 开发\n\n### 复制项目代码\n```\n$ git clone https://github.com/ChanMo/cdjango.git demo \u0026\u0026 cd demo\n```\n\n### 生成Secret_key\n```\n$ python generate_key.py\n```\n将生成的key放入.env文件中\n\n### 启动测试环境\n```\n$ docker-compose up\n```\n\n浏览器访问 http://0.0.0.0:8000\n\n### 执行Python命令\n\n执行数据库同步\n```\n$ docker-compose exec web python manage.py migrate\n```\n\n## 部署\n\n### 创建文件\n```\n$ cp deploy.conf.sample deploy.conf\n$ cp nginx.conf.sample nginx.conf\n$ cp .env .deploy_env\n```\n\n### 启动服务\n```\n$ docker-compose -f deploy.yml\n```\n\n### 使用Systemctl\n```\n$ vim example.service\n$ sudo cp example.service /etc/systemd/system/demo.service\n$ sudo systemctl enable demo # 允许开机运行\n$ sudo systemctl start demo\n$ sudo journalctl -u demo -f # 查看日志\n```\n\n### 使用Fabric持续集成\n详细文档请参考[Fabric官方文档](http://www.fabfile.org/)\n```\n$ fab -H demo deploy\n```\n\n## Next\n\n- [] 自动测试\n- [*] 统一命令行脚本\n- [*] 自动secret_key\n- [*] 日志收集\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchanmo%2Fdjango_boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchanmo%2Fdjango_boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchanmo%2Fdjango_boilerplate/lists"}