Mercurial > sat_docs
diff docker/data/Dockerfile @ 85:bcba1966e6db
docker: certificate generation + various improvments:
- certificate is now auto-generated on first prosody launch is there is not already one
- certificate generated on build is removed to avoid image-wide certificate
- generated certificates are stored in sat_data
- data image is now based on prosody which is itslef based on sat_pubsub
- prosody configuration is moved to /etc/prosody/prosody_sat_cfg, and stored in sat_data
- building order changed to adapt to new images hierarchy
- libervia default configuration set to both without redirection (and with a security warning)
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 18 Feb 2016 17:31:09 +0100 |
parents | 686a8c982c3f |
children |
line wrap: on
line diff
--- a/docker/data/Dockerfile Thu Feb 18 17:23:08 2016 +0100 +++ b/docker/data/Dockerfile Thu Feb 18 17:31:09 2016 +0100 @@ -6,7 +6,7 @@ # # ############################################################### -FROM salutatoi/sat_pubsub:latest +FROM salutatoi/prosody:latest MAINTAINER Goffi <goffi@goffi.org> @@ -14,17 +14,21 @@ # VOLUMES # ########### +USER root + # sat user home, where most of config files and databases are located VOLUME ["/home/sat"] # Prosody -# we need to use number instead of name as data doesn't known prosody user -RUN mkdir -p /var/lib/prosody && chown 105:108 /var/lib/prosody && chmod 0750 /var/lib/prosody VOLUME ["/var/lib/prosody"] +VOLUME ["/etc/prosody/prosody_sat_cfg"] # Postgres database, used in SàT PubSub VOLUME ["/var/lib/postgresql"] +# TLS certificates +VOLUME ["/usr/share/sat/certificates"] + # Logs not shown directly with docker logs VOLUME ["/var/log"] @@ -33,10 +37,12 @@ ########## WORKDIR /volumes -RUN ln -s /home/sat sat -RUN ln -s /var/lib/prosody prosody -RUN ln -s /var/lib/postgresql postgresql -RUN ln -s /var/log log +RUN ln -s /home/sat sat && \ +ln -s /usr/share/sat/certificates certificates && \ +ln -s /var/lib/prosody prosody && \ +ln -s /etc/prosody/prosody_sat_cfg prosody_sat_cfg && \ +ln -s /var/lib/postgresql postgresql && \ +ln -s /var/log log VOLUME ["/volumes"] ENTRYPOINT ["/bin/true"]