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.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. version: '2'
  2. networks:
  3. default:
  4. external:
  5. name: prod
  6. services:
  7. db:
  8. image: postgres:9.6-alpine
  9. restart: unless-stopped
  10. command: -c 'shared_preload_libraries=pg_stat_statements' -c 'pg_stat_statements.track=all'
  11. volumes:
  12. - ./data/db:/var/lib/postgresql/data
  13. redis:
  14. image: redis:4-alpine
  15. restart: unless-stopped
  16. volumes:
  17. - ./data/redis:/data
  18. es:
  19. image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.4
  20. restart: unless-stopped
  21. environment:
  22. ES_JAVA_OPTS: "-Xms${DOCKER__ES_RAM_MAX} -Xmx${DOCKER__ES_RAM_MAX}"
  23. ports:
  24. - "127.0.0.1:13999:9200"
  25. volumes:
  26. - ./data/elasticsearch:/usr/share/elasticsearch/data
  27. sidekiq:
  28. build: .
  29. restart: unless-stopped
  30. env_file: .env.production
  31. environment:
  32. - DB_POOL=${DOCKER__SIDEKIQ_THREADS}
  33. command: bundle exec sidekiq -c ${DOCKER__SIDEKIQ_THREADS} -q default -q mailers -q pull -q push
  34. links:
  35. - db
  36. - redis
  37. - es
  38. volumes:
  39. - ./public/system:/mastodon/public/system
  40. streaming:
  41. build: .
  42. restart: unless-stopped
  43. env_file: .env.production
  44. command: yarn start
  45. links:
  46. - db
  47. - redis
  48. - es
  49. labels:
  50. traefik.enable: "true"
  51. traefik.protocol: "http"
  52. traefik.port: "4000"
  53. traefik.frontend.rule: "Host:ws.cofe.moe"
  54. web:
  55. build: .
  56. restart: unless-stopped
  57. env_file: .env.production
  58. command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000 -b '0.0.0.0'"
  59. environment:
  60. MAX_THREADS: ${DOCKER__WEB_THREADS_MAX}
  61. WEB_CONCURRENCY: ${DOCKER__WEB_CONCURRENCY}
  62. volumes:
  63. - ./public/system:/mastodon/public/system
  64. links:
  65. - db
  66. - redis
  67. - es
  68. labels:
  69. - traefik.enable=true
  70. - traefik.port=3000
  71. - traefik.protocol=http
  72. - traefik.backend=masto
  73. - traefik.frontend.rule=Host:cofe.moe,cdn.cofe.moe,cdn-raw.cofe.moe
  74. - traefik.frontend.headers.customResponseHeaders=Access-Control-Allow-Origin:*
  75. - traefik.frontend.backend=masto