Closed CJxD closed 3 years ago
The only reason I have, is that I want to be sure, that everything will work fine, once the container is restarted and use exactly the same path. Can't see a reason, why restarting the container is a problem, especially, that usually it's done automatically.
I don't see why it wouldn't work. I ran into this issue because my CI/CD pipeline thinks that the deployment failed after it terminates unexpectedly. I then have to run the pipeline again for a successful deployment.
If you plan that your pipeline does both action - database initialization and running the container, I'd suggest to do that in two separate steps in pipeline - one that does the first run, and second - that does the standard docker run command.
I see that after the database is initialized, the script exits and tells you to run 'docker start', such that on the second run it will start nginx.
Is there a reason for that, rather than just starting nginx after initialisation?