RedpointArchive / phabricator

A Docker image that runs Phabricator, an open source software engineering tool
https://hub.docker.com/r/redpointgames/phabricator/
307 stars 98 forks source link

Container failed to restart when SSL is enabled #75

Closed opensourcer2 closed 7 years ago

opensourcer2 commented 7 years ago

I enabled SSL by setting the ENV

--env SSL_TYPE=manual
--env SSL_CERTIFICATE=/ssl/cert.pem
--env SSL_PRIVATE_KEY=/ssl/cert.key
-v /srv/phabricator/ssl:/ssl

Starting a fresh container works fine by running docker run -d --restart=always ...

However, when restarting a running container or rebooting the host while a container is running, the container failed to start. The error log shows

...
'[' manual == manual ']'
+ '[' '!' -f /baked ']'
+ cp -f /ssl/cert.pem /etc/nginx/cert.pem
+ cp -f /ssl/cert.key /etc/nginx/cert.key
+ chown nginx:nginx /etc/nginx/cert.pem /etc/nginx/cert.key
+ chmod 0400 /etc/nginx/cert.pem /etc/nginx/cert.key
+ mv /app/disabled-server-https-manual.conf /app/nginx.ssl.manual.conf
mv: cannot stat '/app/disabled-server-https-manual.conf': No such file or directory
hach-que commented 7 years ago

This container is not intended to be restarted. You need to throw away the container and create a new one each time (we recommend running with --rm).