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.

98 lines
2.2 KiB

8 years ago
  1. version: '3'
  2. services:
  3. db:
  4. restart: always
  5. image: postgres:9.6-alpine
  6. networks:
  7. - internal_network
  8. volumes:
  9. - ./postgres:/var/lib/postgresql/data
  10. redis:
  11. restart: always
  12. image: redis:4.0-alpine
  13. networks:
  14. - internal_network
  15. volumes:
  16. - ./redis:/data
  17. # es:
  18. # restart: always
  19. # image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.1.3
  20. # environment:
  21. # - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  22. # networks:
  23. # - internal_network
  24. # volumes:
  25. # - ./elasticsearch:/usr/share/elasticsearch/data
  26. web:
  27. build: .
  28. image: tootsuite/mastodon
  29. restart: always
  30. env_file: .env.production
  31. command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000 -b '0.0.0.0'"
  32. networks:
  33. - external_network
  34. - internal_network
  35. ports:
  36. - "127.0.0.1:3000:3000"
  37. depends_on:
  38. - db
  39. - redis
  40. # - es
  41. volumes:
  42. - ./public/system:/mastodon/public/system
  43. streaming:
  44. build: .
  45. image: tootsuite/mastodon
  46. restart: always
  47. env_file: .env.production
  48. command: yarn start
  49. networks:
  50. - external_network
  51. - internal_network
  52. ports:
  53. - "127.0.0.1:4000:4000"
  54. depends_on:
  55. - db
  56. - redis
  57. sidekiq:
  58. build: .
  59. image: tootsuite/mastodon
  60. restart: always
  61. env_file: .env.production
  62. command: bundle exec sidekiq
  63. depends_on:
  64. - db
  65. - redis
  66. networks:
  67. - external_network
  68. - internal_network
  69. volumes:
  70. - ./public/system:/mastodon/public/system
  71. ## Uncomment to enable federation with tor instances along with adding the following ENV variables
  72. ## http_proxy=http://privoxy:8118
  73. ## ALLOW_ACCESS_TO_HIDDEN_SERVICE=true
  74. # tor:
  75. # build: https://github.com/usbsnowcrash/docker-tor.git
  76. # networks:
  77. # - external_network
  78. # - internal_network
  79. #
  80. # privoxy:
  81. # build: https://github.com/usbsnowcrash/docker-privoxy.git
  82. # command: /opt/sbin/privoxy --no-daemon --user privoxy.privoxy /opt/config
  83. # volumes:
  84. # - ./priv-config:/opt/config
  85. # networks:
  86. # - external_network
  87. # - internal_network
  88. networks:
  89. external_network:
  90. internal_network:
  91. internal: true