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.

87 lines
1.8 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. ### Uncomment to enable DB persistance
  9. # volumes:
  10. # - ./postgres:/var/lib/postgresql/data
  11. redis:
  12. restart: always
  13. image: redis:4.0-alpine
  14. networks:
  15. - internal_network
  16. ### Uncomment to enable REDIS persistance
  17. # volumes:
  18. # - ./redis:/data
  19. # es:
  20. # restart: always
  21. # image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.1.3
  22. # environment:
  23. # - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  24. # networks:
  25. # - internal_network
  26. #### Uncomment to enable ES persistance
  27. ## volumes:
  28. ## - ./elasticsearch:/usr/share/elasticsearch/data
  29. web:
  30. build: .
  31. image: gargron/mastodon
  32. restart: always
  33. env_file: .env.production
  34. command: bundle exec rails s -p 3000 -b '0.0.0.0'
  35. networks:
  36. - external_network
  37. - internal_network
  38. ports:
  39. - "3000:3000"
  40. depends_on:
  41. - db
  42. - redis
  43. # - es
  44. volumes:
  45. - ./public/assets:/mastodon/public/assets
  46. - ./public/packs:/mastodon/public/packs
  47. - ./public/system:/mastodon/public/system
  48. streaming:
  49. build: .
  50. image: gargron/mastodon
  51. restart: always
  52. env_file: .env.production
  53. command: npm run start
  54. networks:
  55. - external_network
  56. - internal_network
  57. ports:
  58. - "4000:4000"
  59. depends_on:
  60. - db
  61. - redis
  62. sidekiq:
  63. build: .
  64. image: gargron/mastodon
  65. restart: always
  66. env_file: .env.production
  67. command: bundle exec sidekiq -q default -q mailers -q pull -q push
  68. depends_on:
  69. - db
  70. - redis
  71. networks:
  72. - external_network
  73. - internal_network
  74. volumes:
  75. - ./public/packs:/mastodon/public/packs
  76. - ./public/system:/mastodon/public/system
  77. networks:
  78. external_network:
  79. internal_network:
  80. internal: true