我目前docker-compose.yml
是
version: "2"
services:
nginx:
restart: always
image: nginx:latest
ports:
- 80:80
- 443:443
volumes:
- ./misc/nginx.conf:/etc/nginx/conf.d/default.conf
- /static:/static
depends_on:
- web
db:
restart: always
image: postgres
env_file:
- ./.env
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
web:
restart: always
build:
context: .
command: bash -c "python /code/manage.py collectstatic --noinput && python /code/manage.py migrate && /code/run_gunicorn.sh"
volumes:
- /static:/data/web/static
- /media:/data/web/media
- .:/code
env_file:
- ./.env
depends_on:
- db
volumes:
pgdata:
external:
name: orderstore
如何通过swarm模式支持将其更新到最新的docker-compose版本(3.4)?至少现在build
是说不支持该密钥。
我的目标是将其部署到AWS EC2/ECS
。如果有可能,请向我描述如何将其正确部署到AWS。
谢谢
我不知道自动迁移撰写文件的方法。这些更改记录在Compose文件版本和升级中。您需要手动进行迁移。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句