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.

84 lines
1.9 KiB

  1. version: '3'
  2. services:
  3. app:
  4. build:
  5. context: .
  6. dockerfile: Dockerfile
  7. args:
  8. # Update 'VARIANT' to pick a version of Ruby: 3, 3.1, 3.0, 2, 2.7, 2.6
  9. # Append -bullseye or -buster to pin to an OS version.
  10. # Use -bullseye variants on local arm64/Apple Silicon.
  11. VARIANT: "3.0-bullseye"
  12. # Optional Node.js version to install
  13. NODE_VERSION: "14"
  14. volumes:
  15. - ..:/workspaces/mastodon:cached
  16. environment:
  17. RAILS_ENV: development
  18. NODE_ENV: development
  19. REDIS_HOST: redis
  20. REDIS_PORT: '6379'
  21. DB_HOST: db
  22. DB_USER: postgres
  23. DB_PASS: postgres
  24. DB_PORT: '5432'
  25. ES_ENABLED: 'true'
  26. ES_HOST: es
  27. ES_PORT: '9200'
  28. # Overrides default command so things don't shut down after the process ends.
  29. command: sleep infinity
  30. networks:
  31. - external_network
  32. - internal_network
  33. user: vscode
  34. db:
  35. image: postgres:14-alpine
  36. restart: unless-stopped
  37. volumes:
  38. - postgres-data:/var/lib/postgresql/data
  39. environment:
  40. POSTGRES_USER: postgres
  41. POSTGRES_DB: postgres
  42. POSTGRES_PASSWORD: postgres
  43. POSTGRES_HOST_AUTH_METHOD: trust
  44. networks:
  45. - internal_network
  46. redis:
  47. image: redis:6-alpine
  48. restart: unless-stopped
  49. volumes:
  50. - redis-data:/data
  51. networks:
  52. - internal_network
  53. es:
  54. image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
  55. restart: unless-stopped
  56. environment:
  57. ES_JAVA_OPTS: -Xms512m -Xmx512m
  58. cluster.name: es-mastodon
  59. discovery.type: single-node
  60. bootstrap.memory_lock: 'true'
  61. volumes:
  62. - es-data:/usr/share/elasticsearch/data
  63. networks:
  64. - internal_network
  65. ulimits:
  66. memlock:
  67. soft: -1
  68. hard: -1
  69. volumes:
  70. postgres-data:
  71. redis-data:
  72. es-data:
  73. networks:
  74. external_network:
  75. internal_network:
  76. internal: true