后台小程序开发的全方位指南
603
2022-10-29
用于创建可以运行在 Docker 云上Django应用程序的模板
Django template for Docker Cloud
This is a template for Django applications that can be run with Docker Compose locally and Docker Cloud in production.
Getting started
To get started (replace myapp with the name of your app):
$ docker run -it --rm -v "$PWD":/usr/src/app -w /usr/src/app django django-admin.py startproject --template https://github.com/bfirsh/django-docker-cloud-template/zipball/master myapp$ cd myapp
This readme file is now in your app's directory. You can delete this top bit and everything that follows is the start of your app's readme.
{{ project_name }}
Description of {{ project_name }}.
Running in development
Install Docker for Mac or Windows.
Do the initial database migration:
$ docker-compose run web python manage.py migrate
Then to run the app:
$ docker-compose up
Your app is now available at http://localhost:8000
Running in production
Upload docker-cloud.yml to Docker Cloud, filling in:
SECRET_KEY with a random string (run openssl rand -base64 64 to generate)ALLOWED_HOSTS with the hostname that the app is running on
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~