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.

75 lines
1.5 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. web:
  20. build: .
  21. image: gargron/mastodon
  22. restart: always
  23. env_file: .env.production
  24. command: bundle exec rails s -p 3000 -b '0.0.0.0'
  25. networks:
  26. - external_network
  27. - internal_network
  28. ports:
  29. - "3000:3000"
  30. depends_on:
  31. - db
  32. - redis
  33. volumes:
  34. - ./public/assets:/mastodon/public/assets
  35. - ./public/packs:/mastodon/public/packs
  36. - ./public/system:/mastodon/public/system
  37. streaming:
  38. build: .
  39. image: gargron/mastodon
  40. restart: always
  41. env_file: .env.production
  42. command: npm run start
  43. networks:
  44. - external_network
  45. - internal_network
  46. ports:
  47. - "4000:4000"
  48. depends_on:
  49. - db
  50. - redis
  51. sidekiq:
  52. build: .
  53. image: gargron/mastodon
  54. restart: always
  55. env_file: .env.production
  56. command: bundle exec sidekiq -q default -q mailers -q pull -q push
  57. depends_on:
  58. - db
  59. - redis
  60. networks:
  61. - external_network
  62. - internal_network
  63. volumes:
  64. - ./public/packs:/mastodon/public/packs
  65. - ./public/system:/mastodon/public/system
  66. networks:
  67. external_network:
  68. internal_network:
  69. internal: true