How to influence deploy behaviour in single-instance single-container env

0

Hi,

The scenario is that we have an app (YouTrack) running in a single Docker container on a single-instance EB environment. The app keeps its state in a mounted EFS filesystem. In trying to upgrade to the next version of the app, the deploy fails with an exit code of 1 for the container and a "YouTrack is already running" error message.

It appears that:

  • EB uploads the new container to the instance and attempts to start it.
  • While starting up, the new version finds that some of the filesystem resources are in use by the still-running old container.
  • It quits with the above error and the deploy fails.

I've read somewhere (but not 100% sure) that this is expected behaviour - that the old container is left running while the new one is started, and then the two are switched.

How can I prevent that happening? Is there something about the deploy configuration I can change that will cause EB to stop the old container, wait for it to exit, and only then start the new one?

(Have tried ssh'ing into the instance and killing the old container manually, but something apparently outside Docker itself is instantly restarting it every time)

jlmt
질문됨 4년 전202회 조회
1개 답변
0

Solved the issue - the key was to run "sudo stop eb-docker" on the EB instance before the deploy - that stopped the old container, prevented the locking issue, and all went ahead ok.

jlmt
답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠