ニジカ投稿局 https://tv.nizika.tv
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.

docker-compose.yml 2.9 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. services:
  2. # You can comment this webserver section if you want to use another webserver/proxy or test PeerTube in local
  3. webserver:
  4. image: chocobozzz/peertube-webserver:latest
  5. # If you don't want to use the official image and build one from sources:
  6. # build:
  7. # context: .
  8. # dockerfile: Dockerfile.nginx
  9. env_file:
  10. - .env
  11. ports:
  12. - "80:80"
  13. - "443:443"
  14. volumes:
  15. - type: bind
  16. # Switch sources if you downloaded the whole repository
  17. #source: ../../nginx/peertube
  18. source: ./docker-volume/nginx/peertube
  19. target: /etc/nginx/conf.d/peertube.template
  20. - assets:/var/www/peertube/peertube-latest/client/dist:ro
  21. - ./docker-volume/data:/var/www/peertube/storage
  22. - certbot-www:/var/www/certbot
  23. - ./docker-volume/certbot/conf:/etc/letsencrypt
  24. depends_on:
  25. - peertube
  26. restart: "always"
  27. # You can comment this certbot section if you want to use another webserver/proxy or test PeerTube in local
  28. certbot:
  29. container_name: certbot
  30. image: certbot/certbot
  31. volumes:
  32. - ./docker-volume/certbot/conf:/etc/letsencrypt
  33. - certbot-www:/var/www/certbot
  34. restart: unless-stopped
  35. entrypoint: /bin/sh -c "trap exit TERM; while :; do certbot renew --webroot -w /var/www/certbot; sleep 12h & wait $${!}; done;"
  36. depends_on:
  37. - webserver
  38. peertube:
  39. # If you don't want to use the official image and build one from sources:
  40. # build:
  41. # context: .
  42. # dockerfile: ./support/docker/production/Dockerfile.bookworm
  43. image: chocobozzz/peertube:production-bookworm
  44. # Use a static IP for this container because nginx does not handle proxy host change without reload
  45. # This container could be restarted on crash or until the postgresql database is ready for connection
  46. networks:
  47. default:
  48. ipv4_address: 172.18.0.42
  49. env_file:
  50. - .env
  51. ports:
  52. - "1935:1935" # Comment if you don't want to use the live feature
  53. # - "9000:9000" # Uncomment if you use another webserver/proxy or test PeerTube in local, otherwise not suitable for production
  54. volumes:
  55. # Remove the following line if you want to use another webserver/proxy or test PeerTube in local
  56. - assets:/app/client/dist
  57. - ./docker-volume/data:/data
  58. - ./docker-volume/config:/config
  59. depends_on:
  60. - postgres
  61. - redis
  62. - postfix
  63. restart: "always"
  64. postgres:
  65. image: postgres:13-alpine
  66. env_file:
  67. - .env
  68. volumes:
  69. - ./docker-volume/db:/var/lib/postgresql/data
  70. restart: "always"
  71. redis:
  72. image: redis:6-alpine
  73. volumes:
  74. - ./docker-volume/redis:/data
  75. restart: "always"
  76. postfix:
  77. image: mwader/postfix-relay
  78. env_file:
  79. - .env
  80. volumes:
  81. - ./docker-volume/opendkim/keys:/etc/opendkim/keys
  82. restart: "always"
  83. networks:
  84. default:
  85. ipam:
  86. driver: default
  87. config:
  88. - subnet: 172.18.0.0/16
  89. volumes:
  90. assets:
  91. certbot-www: