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

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