wiktorn / Overpass-API

Overpass API docker image
MIT License
134 stars 48 forks source link

Rationale behind having to start the container twice? #49

Closed CJxD closed 3 years ago

CJxD commented 4 years ago

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?

wiktorn commented 4 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.

CJxD commented 4 years ago

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.

wiktorn commented 4 years ago

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.