Closed tmokmss closed 2 weeks ago
@tmokmss Hello! I'm here to help you with any bugs, questions, or contributions. Feel free to ask for assistance while waiting for a human maintainer.
To ensure that the kill signal is passed to the main process when running Dify version 0.6.13 in a self-hosted Docker environment, you should use the --init
flag with the docker run
command. This flag runs an init inside the container that forwards signals and reaps processes.
However, since you are using Docker Compose, you can add the init: true
option to your docker-compose.yml
file for the relevant services. Here is an example of how you can modify your docker-compose.yml
file:
version: '3.8'
services:
api:
image: langgenius/dify-api:0.6.13
init: true
# other configurations
web:
image: langgenius/dify-web:0.6.13
init: true
# other configurations
worker:
image: langgenius/dify-api:0.6.13
init: true
# other configurations
# other services
This ensures that the init system inside the container will handle the forwarding of signals to the main process [1].
To continue talking to Dosu, mention @dosu.
Self Checks
Dify version
0.6.13
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
docker run langgenius/dify-api:0.6.13
✔️ Expected Behavior
Container is killed by kill signals.
❌ Actual Behavior
Kill signals are ignored and the container is not shut down. Because of this behavior, a container orchestrator such as ECS have to wait for shutdown timeout, slowing down the deployment process. (ref)