时间:2017-08-17来源:系统城装机大师作者:zhijie
Docker Compose
让我们看一看 docker-compose.yml 文件:
web:
restart: always
build: 。/web
expose:
- “8000”
links:
- postgres:postgres
- redis:redis
volumes:
- /usr/src/app/static
env_file: .env
command: /usr/local/bin/gunicorn docker_django.wsgi:application -w 2 -b :8000
nginx:
restart: always
build: 。/nginx/
ports:
- “80:80”
volumes:
- /www/static
volumes_from:
- web
links:
- web:web
postgres:
restart: always
image: postgres:latest
volumes_from:
- data
ports:
- “5432:5432”
redis:
restart: always
image: redis:latest
ports:
- “6379:6379”
data:
restart: always
image: postgres:latest
volumes:
- /var/lib/postgresql
command: true
在这里,我们定义了五个服务: Web、Nginx、Postgres、Redis 和 Data。
2023-02-28
解决linux不识别nfst格式u盘问题技巧 linux无法识别ntfs格式U盘怎么办?2023-02-28
linux扩容swap分区的技巧 linux怎么调整swap大小?2023-02-26
微软Linux资源库首次加入Edge浏览器稳定版当linux在运作时不能直接关闭电源容易将档案系统损毁,因此需要用shutdown以安全的方式关闭,那么这个操作该怎么实现呢?下面就为大家带来了详细教程。...
2022-11-07
由于linux系统和我们常用的windows系统是不一样的,所以如果是初学者,可能会不知道linux怎么强制删除文件,其实我们只要打开终端,使用命令就可以删除了。...
2022-11-03