You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
2.2 KiB

  1. version: "4.1"
  2. services:
  3. reverse-proxy:
  4. image: traefik
  5. command: --docker # Tells Træfik to listen to docker
  6. ports:
  7. - "80:80" # The HTTP port
  8. - "443:443" # The HTTPS port
  9. volumes:
  10. - /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events
  11. - ./docker-volume/traefik/acme.json:/etc/acme.json
  12. - ./docker-volume/traefik/traefik.toml:/traefik.toml
  13. restart: "always"
  14. # If you want to use the Traefik dashboard, you should expose it on a
  15. # subdomain with HTTPS and authentification:
  16. # https://medium.com/@xavier.priour/secure-traefik-dashboard-with-https-and-password-in-docker-5b657e2aa15f
  17. # https://github.com/containous/traefik/issues/880#issuecomment-310301168
  18. peertube:
  19. # If you don't want to use the official image and build one from sources
  20. # build:
  21. # context: .
  22. # dockerfile: ./support/docker/production/Dockerfile.stretch
  23. image: chocobozzz/peertube:production-stretch
  24. env_file:
  25. - .env
  26. # Traefik labels are suggested as an example for people using Traefik,
  27. # remove them if you are using another reverse proxy.
  28. labels:
  29. traefik.enable: "true"
  30. traefik.frontend.rule: "Host:${PEERTUBE_WEBSERVER_HOSTNAME}"
  31. traefik.port: "9000"
  32. # If you don't want to use a reverse proxy (not suitable for production!)
  33. # ports:
  34. # - "80:9000"
  35. volumes:
  36. - ./docker-volume/data:/data
  37. - ./docker-volume/config:/config
  38. depends_on:
  39. - postgres
  40. - redis
  41. - postfix
  42. restart: "always"
  43. postgres:
  44. image: postgres:10-alpine
  45. environment:
  46. POSTGRES_USER: ${PEERTUBE_DB_USERNAME}
  47. POSTGRES_PASSWORD: ${PEERTUBE_DB_PASSWORD}
  48. POSTGRES_DB: peertube
  49. volumes:
  50. - ./docker-volume/db:/var/lib/postgresql/data
  51. restart: "always"
  52. labels:
  53. traefik.enable: "false"
  54. redis:
  55. image: redis:4-alpine
  56. volumes:
  57. - ./docker-volume/redis:/data
  58. restart: "always"
  59. labels:
  60. traefik.enable: "false"
  61. postfix:
  62. image: mwader/postfix-relay
  63. environment:
  64. - POSTFIX_myhostname=${PEERTUBE_WEBSERVER_HOSTNAME}
  65. labels:
  66. traefik.enable: "false"
  67. restart: "always"