I successfully applied the Django application with this command
eb create --database.engine postgres.
After applying the above command, you will receive an error message
ERROR: Operation completed. The state of the environment is unknown.
after receiving this error you just git add, commit and deploy the eb project. Using this method, I successfully deployed a Django project for AWS my .ebextensions commands are added below 01_packages.config
packages: yum: git: [] libffi-devel: [] python27-devel: [] postgresql93: [] postgresql93-devel: [] gcc-c++: []
first add the above configuration and set the correct wsgi path and configure the correct RDS configuration in your .py.Then settings add, commit and expand. After that add the configuration below and expand
02_python.config
container_commands: 01_migrate: command: "source /opt/python/run/venv/bin/activate && python /opt/python/current/app/manage.py migrate --noinput" leader_only: true 02_collectstatic: command: "source /opt/python/run/venv/bin/activate && python /opt/python/current/app/manage.py collectstatic --noinput" leader_only: true 99_runscript: command: "source /opt/python/run/venv/bin/activate && python /opt/python/current/app/manage.py runscript init_db"
source share