view docker/backend-dev-demo/Dockerfile @ 4195:22cd3094cd1e

docker (demo): fix starting + better UX: - Use the new `wait_for_service` option to be sure that Prosody is launched. - Use the new `init_script_path` option to initiate forums and bookmark a demo room. - Activate MUC service. - Change log formats to make them more readable.
author Goffi <goffi@goffi.org>
date Wed, 13 Dec 2023 22:00:25 +0100
parents 04cd749de818
children 6a8cc6d668a4
line wrap: on
line source

FROM libervia/backend:dev

LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>"

USER root

# we install pre-generated demo certificates so they can be trusted
COPY --chown=root:root certificates/minica.pem /usr/local/share/ca-certificates/minica.crt
COPY --chown=root:tls-cert certificates/server1.test/cert.pem /usr/share/libervia/certificates/server1.test.pem
COPY --chown=root:tls-cert certificates/server1.test/key.pem /usr/share/libervia/certificates/server1.test-key.pem
RUN update-ca-certificates

COPY --chown=root:root libervia.conf /etc/libervia.conf

USER libervia

RUN ./entrypoint.sh \
    # we create the file sharing component which will autoconnect when backend is started
    libervia-cli profile create file-sharing -j files.server1.test -p "" --xmpp-password test_e2e -C file-sharing -A && \
    libervia-backend stop

RUN ./entrypoint.sh \
    # and a demo account
    libervia-cli profile create demo -j demo@server1.test -p "demo"  && \
    libervia-backend stop

COPY --chown=libervia:libervia forums.json /home/libervia/
COPY --chown=libervia:libervia scripts/init_script.sh /home/libervia/

USER libervia
# HTTP Upload
EXPOSE 7777