1
0

compose.yaml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. services:
  2. app:
  3. working_dir: /workspaces/mastodon/
  4. build:
  5. context: ..
  6. dockerfile: .devcontainer/Dockerfile
  7. volumes:
  8. - ..:/workspaces/mastodon: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.6.2
  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