How to run python script running when django server starts. For example, I have a python kafka script , this script should be running continously when django server starts. when i give two commands in Dockerfile like:
CMD ["python", "manage.py","runserver","0.0.0.0:8443"]
CMD [ "python", "./consumer.py"]
only the latest cmd it is picking up.
Any idea how to start python script and django server using single cmd.
how to start python script and django server using single cmd.
In your Dockerfile, add a line to copy a custom startup script into the container. For example:
Create a file named entrypoint.sh and add the following content:
In your Dockerfile, use the following CMD instruction: