1
0

docker-compose.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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:4000:4000'
  28. networks:
  29. - external_network
  30. - internal_network
  31. db:
  32. image: postgres:14-alpine
  33. restart: unless-stopped
  34. volumes:
  35. - postgres-data:/var/lib/postgresql/data
  36. environment:
  37. POSTGRES_USER: postgres
  38. POSTGRES_DB: postgres
  39. POSTGRES_PASSWORD: postgres
  40. POSTGRES_HOST_AUTH_METHOD: trust
  41. networks:
  42. - internal_network
  43. redis:
  44. image: redis:7-alpine
  45. restart: unless-stopped
  46. volumes:
  47. - redis-data:/data
  48. networks:
  49. - internal_network
  50. es:
  51. image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
  52. restart: unless-stopped
  53. environment:
  54. ES_JAVA_OPTS: -Xms512m -Xmx512m
  55. cluster.name: es-mastodon
  56. discovery.type: single-node
  57. bootstrap.memory_lock: 'true'
  58. volumes:
  59. - es-data:/usr/share/elasticsearch/data
  60. networks:
  61. - internal_network
  62. ulimits:
  63. memlock:
  64. soft: -1
  65. hard: -1
  66. libretranslate:
  67. image: libretranslate/libretranslate:v1.3.11
  68. restart: unless-stopped
  69. volumes:
  70. - lt-data:/home/libretranslate/.local
  71. networks:
  72. - external_network
  73. - internal_network
  74. volumes:
  75. postgres-data:
  76. redis-data:
  77. es-data:
  78. lt-data:
  79. networks:
  80. external_network:
  81. internal_network:
  82. internal: true