Advertisement
EurenikZ

Dawarich Docker docker-compose.yml

Jan 2nd, 2025 (edited)
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.58 KB | None | 0 0
  1. networks:
  2. dawarich:
  3. services:
  4. dawarich_redis:
  5. image: redis:7.0-alpine
  6. container_name: dawarich_redis
  7. command: redis-server
  8. networks:
  9. - dawarich
  10. volumes:
  11. - ./dawarich_shared:/data
  12. restart: always
  13. healthcheck:
  14. test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
  15. interval: 10s
  16. retries: 5
  17. start_period: 30s
  18. timeout: 10s
  19. dawarich_db:
  20. image: postgres:14.2-alpine
  21. shm_size: 1G
  22. container_name: dawarich_db
  23. volumes:
  24. - ./dawarich_db_data:/var/lib/postgresql/data
  25. - dawarich_shared:/var/shared
  26. networks:
  27. - dawarich
  28. environment:
  29. POSTGRES_USER: postgres
  30. POSTGRES_PASSWORD: 'SECURE_PASSWORD_HERE'
  31. restart: always
  32. healthcheck:
  33. test: [ "CMD-SHELL", "pg_isready -U postgres -d dawarich_development" ]
  34. interval: 10s
  35. retries: 5
  36. start_period: 30s
  37. timeout: 10s
  38. dawarich_app:
  39. image: freikin/dawarich:latest
  40. container_name: dawarich_app
  41. volumes:
  42. - ./dawarich_gem_cache_app:/usr/local/bundle/gems
  43. - ./dawarich_public:/var/app/public
  44. - ./dawarich_watched:/var/app/tmp/imports/watched
  45. networks:
  46. - dawarich
  47. ports:
  48. - 3000:3000
  49. stdin_open: true
  50. tty: true
  51. entrypoint: dev-entrypoint.sh
  52. command: ['bin/dev']
  53. restart: on-failure
  54. environment:
  55. RAILS_ENV: development
  56. REDIS_URL: redis://dawarich_redis:6379/0
  57. DATABASE_HOST: dawarich_db
  58. DATABASE_USERNAME: postgres
  59. DATABASE_PASSWORD: 'SECURE_PASSWORD_HERE'
  60. DATABASE_NAME: dawarich_development
  61. MIN_MINUTES_SPENT_IN_CITY: 30
  62. APPLICATION_HOSTS: localhost, sub.domain.tld
  63. TIME_ZONE: Europe/Berlin
  64. APPLICATION_PROTOCOL: http
  65. DISTANCE_UNIT: km
  66. PHOTON_API_HOST: photon.komoot.io
  67. PHOTON_API_USE_HTTPS: true
  68. PROMETHEUS_EXPORTER_ENABLED: false
  69. PROMETHEUS_EXPORTER_HOST: 0.0.0.0
  70. PROMETHEUS_EXPORTER_PORT: 9394
  71. ENABLE_TELEMETRY: false
  72. logging:
  73. driver: "json-file"
  74. options:
  75. max-size: "100m"
  76. max-file: "5"
  77. healthcheck:
  78. test: [ "CMD-SHELL", "wget -qO - http://127.0.0.1:3000/api/v1/health | grep -q '\"status\"\\s*:\\s*\"ok\"'" ]
  79. interval: 10s
  80. retries: 30
  81. start_period: 30s
  82. timeout: 10s
  83. depends_on:
  84. dawarich_db:
  85. condition: service_healthy
  86. restart: true
  87. dawarich_redis:
  88. condition: service_healthy
  89. restart: true
  90. deploy:
  91. resources:
  92. limits:
  93. cpus: '0.40' # Limit CPU usage to 40% of one core
  94. memory: '1G' # Limit memory usage to 1GB
  95. dawarich_sidekiq:
  96. image: freikin/dawarich:latest
  97. container_name: dawarich_sidekiq
  98. volumes:
  99. - ./dawarich_gem_cache_sidekiq:/usr/local/bundle/gems
  100. - ./dawarich_public:/var/app/public
  101. - ./dawarich_watched:/var/app/tmp/imports/watched
  102. networks:
  103. - dawarich
  104. stdin_open: true
  105. tty: true
  106. entrypoint: dev-entrypoint.sh
  107. command: ['sidekiq']
  108. restart: on-failure
  109. environment:
  110. RAILS_ENV: development
  111. REDIS_URL: redis://dawarich_redis:6379/0
  112. DATABASE_HOST: dawarich_db
  113. DATABASE_USERNAME: postgres
  114. DATABASE_PASSWORD: 'SECURE_PASSWORD_HERE'
  115. DATABASE_NAME: dawarich_development
  116. APPLICATION_HOST: localhost
  117. APPLICATION_HOSTS: localhost
  118. BACKGROUND_PROCESSING_CONCURRENCY: 10
  119. APPLICATION_PROTOCOL: http
  120. DISTANCE_UNIT: km
  121. PHOTON_API_HOST: photon.komoot.io
  122. PHOTON_API_USE_HTTPS: true
  123. PROMETHEUS_EXPORTER_ENABLED: false
  124. PROMETHEUS_EXPORTER_HOST: dawarich_app
  125. PROMETHEUS_EXPORTER_PORT: 9394
  126. ENABLE_TELEMETRY: false
  127. logging:
  128. driver: "json-file"
  129. options:
  130. max-size: "100m"
  131. max-file: "5"
  132. healthcheck:
  133. test: [ "CMD-SHELL", "bundle exec sidekiqmon processes | grep $${HOSTNAME}" ]
  134. interval: 10s
  135. retries: 30
  136. start_period: 30s
  137. timeout: 10s
  138. depends_on:
  139. dawarich_db:
  140. condition: service_healthy
  141. restart: true
  142. dawarich_redis:
  143. condition: service_healthy
  144. restart: true
  145. dawarich_app:
  146. condition: service_healthy
  147. restart: true
  148. deploy:
  149. resources:
  150. limits:
  151. cpus: '0.40' # Limit CPU usage to 40% of one core
  152. memory: '1G' # Limit memory usage to 1GB
  153.  
  154. volumes:
  155. dawarich_db_data:
  156. dawarich_gem_cache_app:
  157. dawarich_gem_cache_sidekiq:
  158. dawarich_shared:
  159. dawarich_public:
  160. dawarich_watched:
  161.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement