Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

40 linhas
1.4 KiB

  1. # syntax=docker/dockerfile:1
  2. # Inherit from the official Synapse docker image
  3. ARG SYNAPSE_VERSION=latest
  4. FROM matrixdotorg/synapse:$SYNAPSE_VERSION
  5. # Install deps
  6. RUN \
  7. --mount=type=cache,target=/var/cache/apt,sharing=locked \
  8. --mount=type=cache,target=/var/lib/apt,sharing=locked \
  9. apt-get update -qq && \
  10. DEBIAN_FRONTEND=noninteractive apt-get install -yqq --no-install-recommends \
  11. redis-server nginx-light
  12. # Install supervisord with pip instead of apt, to avoid installing a second
  13. # copy of python.
  14. RUN --mount=type=cache,target=/root/.cache/pip \
  15. pip install supervisor~=4.2
  16. # Disable the default nginx sites
  17. RUN rm /etc/nginx/sites-enabled/default
  18. # Copy Synapse worker, nginx and supervisord configuration template files
  19. COPY ./docker/conf-workers/* /conf/
  20. # Copy a script to prefix log lines with the supervisor program name
  21. COPY ./docker/prefix-log /usr/local/bin/
  22. # Expose nginx listener port
  23. EXPOSE 8080/tcp
  24. # A script to read environment variables and create the necessary
  25. # files to run the desired worker configuration. Will start supervisord.
  26. COPY ./docker/configure_workers_and_start.py /configure_workers_and_start.py
  27. ENTRYPOINT ["/configure_workers_and_start.py"]
  28. # Replace the healthcheck with one which checks *all* the workers. The script
  29. # is generated by configure_workers_and_start.py.
  30. HEALTHCHECK --start-period=5s --interval=15s --timeout=5s \
  31. CMD /bin/sh /healthcheck.sh