{"id":29904271,"url":"https://github.com/lavieall/seal-django","last_synced_at":"2026-05-18T19:46:44.104Z","repository":{"id":41944308,"uuid":"183551825","full_name":"lavieAll/seal-django","owner":"lavieAll","description":"海豹Django","archived":false,"fork":false,"pushed_at":"2023-04-21T20:54:22.000Z","size":26,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-01T17:59:44.127Z","etag":null,"topics":["django","django-admin","django2"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lavieAll.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-04-26T03:40:19.000Z","updated_at":"2022-10-07T13:01:37.000Z","dependencies_parsed_at":"2024-11-06T00:10:34.082Z","dependency_job_id":null,"html_url":"https://github.com/lavieAll/seal-django","commit_stats":null,"previous_names":["lavieall/seal-django","silianpan/seal-django"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lavieAll/seal-django","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavieAll%2Fseal-django","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavieAll%2Fseal-django/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavieAll%2Fseal-django/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavieAll%2Fseal-django/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lavieAll","download_url":"https://codeload.github.com/lavieAll/seal-django/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavieAll%2Fseal-django/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269518731,"owners_count":24430644,"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","status":"online","status_checked_at":"2025-08-09T02:00:10.424Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["django","django-admin","django2"],"created_at":"2025-08-01T17:34:41.276Z","updated_at":"2026-05-18T19:46:44.055Z","avatar_url":"https://github.com/lavieAll.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Django部署\n### 1. 环境\n* OS：CentOS7 x86_64\n* Python: 3.6\n* Django: 2.2\n* uwsgi: 2.0\n* Nginx或Openresty\n* Sqlite: 3.28.0\n### 2. 卸载预装sqlite-3.7\n```bash\nrpm -e --nodeps sqlite-3.7.17-8.el7.x86_64\nrpm -qa |grep nginx\n```\n### 3. 安装Python36\n```bash\nyum install python36-devel\n```\n### 4. 创建并激活虚拟环境\n```bash\npython3 -m venv venv\n. venv/bin/activate\n```\n### 5. Django2.2升级安装sqlite3.28.0\n\u003e https://wangbin.io/blog/it/django2.2-sqlite3.html\n\n#### 依赖安装\n```bash\nyum install gcc\nyum install autoconf automake libtool\n```\n\n#### 安装步骤\n* 下载tar.gz\n* ./configure --prefix=/usr/local/sqlite\n* autoreconf –vfi\n* make\n* make install\n* ln -fs /usr/local/sqlite/bin/sqlite3 /usr/bin/sqlite3\n* 动态库  LD_LIBRARY_PATH=/usr/local/sqlite/lib:$LD_LIBRARY_PATH\n* export LD_LIBRARY_PATH\n* ldconfig\n### 5. 安装uwsgi\n```bash\npip install uwsgi\n```\n### 6. 安装nginx或openresty\n```bash\nyum install nginx\nyum install openresty\n```\n\n### 8. 在项目目录下添加uwsgi.ini配置\n```ini\n[uwsgi]\n# 通过uwsgi访问django需要配置成http\n# 通过nginx请求uwsgi来访问django 需要配置成socket\n# 9000 是django的端口号\nsocket = :9000\n\n# web项目根目录\nchdir = /mnt/data/liupan/gcs-django\n\n# module指定项目自带的的wsgi配置文件位置，项目名称\nmodule = learning_log.wsgi\n\n# 虚拟环境的python_home目录\nhome = /mnt/data/liupan/gcs-django/venv\n\n# 允许存在主进程\nmaster = true\n\n# 开启进程数量\nprocesses = 3\n\n# 服务器退出时自动清理环境\nvacuum = true\n```\n### 7. 测试运行项目\n```bash\n# 安装依赖\npip install -r requirements.txt\n# 创建数据库\npython manage.py migrate\n# 测试运行\npython manage.py runserver\n\n# uwsgi启动\nuwsgi --ini django_uwsgi.ini\n```\n\n### 9. uwsgi启动、停止、重启\n```bash\nuwsgi --ini django_uwsgi.ini\nuwsgi --stop django_uwsgi.pid\nuwsgi --reload django_uwsgi.pid\n```\n\n### 10. nginx配置\n```nginx\nlocation / {\n       include /usr/local/openresty/nginx/conf/uwsgi_params;\n       uwsgi_pass 127.0.0.1:9000;\n   }\n   location /index/ {\n       root /index/;\n   }\n   location /static{\n       alias /mnt/data/liupan/gcs-django;\n   }\n```\n\n### 11. pipenv更改源\n直接修改Pipfile中的url\n```ini\nurl = \"https://pypi.tuna.tsinghua.edu.cn/simple\"\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flavieall%2Fseal-django","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flavieall%2Fseal-django","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flavieall%2Fseal-django/lists"}