docker-compose.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. version: '3'
  2. services:
  3. app:
  4. build:
  5. context: .
  6. dockerfile: Dockerfile
  7. volumes:
  8. - ../..:/workspaces:cached
  9. environment:
  10. RAILS_ENV: development
  11. NODE_ENV: development
  12. BIND: 0.0.0.0
  13. REDIS_HOST: redis
  14. REDIS_PORT: '6379'
  15. DB_HOST: db
  16. DB_USER: postgres
  17. DB_PASS: postgres
  18. DB_PORT: '5432'
  19. ES_ENABLED: 'true'
  20. ES_HOST: es
  21. ES_PORT: '9200'
  22. LIBRE_TRANSLATE_ENDPOINT: http://libretranslate:5000
  23. # Overrides default command so things don't shut down after the process ends.
  24. command: sleep infinity
  25. ports:
  26. - '127.0.0.1:3000:3000'
  27. - '127.0.0.1:3035:3035'
  28. - '127.0.0.1:4000:4000'
  29. networks:
  30. - external_network
  31. - internal_network
  32. db:
  33. image: postgres:14-alpine
  34. restart: unless-stopped
  35. volumes:
  36. - postgres-data:/var/lib/postgresql/data
  37. environment:
  38. POSTGRES_USER: postgres
  39. POSTGRES_DB: postgres
  40. POSTGRES_PASSWORD: postgres
  41. POSTGRES_HOST_AUTH_METHOD: trust
  42. networks:
  43. - internal_network
  44. redis:
  45. image: redis:7-alpine
  46. restart: unless-stopped
  47. volumes:
  48. - redis-data:/data
  49. networks:
  50. - internal_network
  51. es:
  52. image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
  53. restart: unless-stopped
  54. environment:
  55. ES_JAVA_OPTS: -Xms512m -Xmx512m
  56. cluster.name: es-mastodon
  57. discovery.type: single-node
  58. bootstrap.memory_lock: 'true'
  59. volumes:
  60. - es-data:/usr/share/elasticsearch/data
  61. networks:
  62. - internal_network
  63. ulimits:
  64. memlock:
  65. soft: -1
  66. hard: -1
  67. libretranslate:
  68. image: libretranslate/libretranslate:v1.5.4
  69. restart: unless-stopped
  70. volumes:
  71. - lt-data:/home/libretranslate/.local
  72. networks:
  73. - external_network
  74. - internal_network
  75. volumes:
  76. postgres-data:
  77. redis-data:
  78. es-data:
  79. lt-data:
  80. networks:
  81. external_network:
  82. internal_network:
  83. internal: true