My current docker-compose.yml
is
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
How to update it to the latest docker-compose revision (3.4) with swarm mode support? At least now it's saying that build
key is not supported.
My very goal is to deploy it to AWS EC2/ECS
. If it's possible - please describe me how to properly deploy it to AWS.
Thanks
I am not aware of an automatic way of migrating compose file. The changes are documented in Compose file versions and upgrading. You need to do the migration manually.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With