django - Elasticbeanstalk Django issues with ondeck vs current version
问题描述
Using Elasticbeanstalk to deploy a Django application. Within the .ebextensions
directory I've got the following (this is just a subset):
commands:
00_pip_upgrade:
command: /opt/python/run/venv/bin/pip install --upgrade pip
leader_only: true
01_pip_install:
command: /opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt
leader_only: true
container_commands:
111_collectstatic:
command: "source /opt/python/run/venv/bin/activate && python /opt/python/ondeck/app/manage.py collectstatic --noinput"
leader_only: true
The issue is that anything with ondeck
isn't found. I am having trouble finding AWS documentation regarding the transitions between bundle
, ondeck
, and current
directories. When I ssh into the instances I don't see any directory at all for /opt/python/ondeck
.
Can someone help to explain if /opt/python/ondeck
should still be used or what my issues may be?
解决方案
Well after speaking with AWS support I have a little more information. My inability to find any documentation regarding /opt/python/ondeck
is because each EB could use different paths based on the its settings. If you need help understanding the directories in your current situation, checkout cloudformation. Additional important information:
- The
commands
section of.ebextensions
will not have access to the staging (new deployment code) because it exists before it - The
container_commands
will have access to staging code so I needed to move some items here. For me/opt/python/ondeck
worked as expected within this section.
推荐阅读
- c# - 如何在 Discord.NET 库上获取自定义用户状态
- github-actions - GitHub Action 可以知道它在 @ 字符之后指定的版本吗?
- c++ - CreateWindow 预期表达式和语法错误
- python - 更改 django 默认 modeladmin 面包屑
- java - 在具有 Windows zulu8 的同一台机器上使用 SimpleDateFormat 使用相同语言环境的不同结果
- c# - asp.net 构建成功但发布失败并出现 System.OutOfMemoryException 错误
- .net-core - MMALSharp 单摄像头双预览带叠加
- python - 如何在 PyTest 中使用一个夹具的数据集作为另一个夹具的参数?
- java - 如何重置系统属性 javax.net.ssl.trustStorePassword?
- xml - Progress PRODATASET - 在 10.1C 中是否有等效的父 ID 字段?还是替代方案?