我最近启动了一个项目来了解DevOps实践的更多信息。我开发了一个django应用程序,想在我的应用程序中写技术文章。我的网站准备发布,但我有一些问题。
我设计了我的应用程序,并与Docker Compose合作,但我不想浪费时间在nginx上,所以我也想设计它。
version: '3.6'
services:
db:
image: postgres
volumes:
- postgres_data:/var/lib/postgresql/data/
web:
build: .
image: dockerdjangoexample
command: bash -c "python manage.py makemigrations && python manage.py migrate && python manage.py collectstatic --noinput && gunicorn fatihkocnet.wsgi -b 0.0.0.0:8000"
volumes:
- .:/fatihkocnet
- ./fatihkocnet/career/static:/static
depends_on:
- db
nginx:
restart: always
image: nginx
ports:
- "8000:8000"
volumes:
- .:/fatihkocnet
- ./fatihkocnet/career/static:/static
- ./nginx.conf:/etc/nginx/conf.d
depends_on:
- web
volumes:
postgres_data:
nginx零件现在不工作。仍在尝试配置此项,但我也有其他问题。我认为,没有生产和开发环境。我不能在开发时轻松使用nginx。它永远不会正常工作。所以我想我可以用詹金斯和吉特。同时,我想把我的项目分享给其他拥有麻省理工学院执照的人。然后我意识到我不能,因为在源代码中我使用了我的生产密码、用户名等。
主要问题:如何创建生产和开发环境。它只是使用git吗?或者我需要创建全新的基础设施?如何在不给每个人密码的情况下开发免费软件?我可以在Github中加密它们吗?
我认为生产和开发环境将解决我的问题。我看到每个人都这么说,但那是什么?这是什么意思?是关于git分支的吗?