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.

82 lines
1.7 KiB

  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. REDIS_HOST: redis
  13. REDIS_PORT: '6379'
  14. DB_HOST: db
  15. DB_USER: postgres
  16. DB_PASS: postgres
  17. DB_PORT: '5432'
  18. ES_ENABLED: 'true'
  19. ES_HOST: es
  20. ES_PORT: '9200'
  21. LIBRE_TRANSLATE_ENDPOINT: http://libretranslate:5000
  22. # Overrides default command so things don't shut down after the process ends.
  23. command: sleep infinity
  24. networks:
  25. - external_network
  26. - internal_network
  27. db:
  28. image: postgres:14-alpine
  29. restart: unless-stopped
  30. volumes:
  31. - postgres-data:/var/lib/postgresql/data
  32. environment:
  33. POSTGRES_USER: postgres
  34. POSTGRES_DB: postgres
  35. POSTGRES_PASSWORD: postgres
  36. POSTGRES_HOST_AUTH_METHOD: trust
  37. networks:
  38. - internal_network
  39. redis:
  40. image: redis:6-alpine
  41. restart: unless-stopped
  42. volumes:
  43. - redis-data:/data
  44. networks:
  45. - internal_network
  46. es:
  47. image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
  48. restart: unless-stopped
  49. environment:
  50. ES_JAVA_OPTS: -Xms512m -Xmx512m
  51. cluster.name: es-mastodon
  52. discovery.type: single-node
  53. bootstrap.memory_lock: 'true'
  54. volumes:
  55. - es-data:/usr/share/elasticsearch/data
  56. networks:
  57. - internal_network
  58. ulimits:
  59. memlock:
  60. soft: -1
  61. hard: -1
  62. libretranslate:
  63. image: libretranslate/libretranslate:v1.2.9
  64. restart: unless-stopped
  65. networks:
  66. - internal_network
  67. volumes:
  68. postgres-data:
  69. redis-data:
  70. es-data:
  71. networks:
  72. external_network:
  73. internal_network:
  74. internal: true