Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

docker-compose.yml 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. version: '3'
  2. volumes:
  3. database_data:
  4. driver: local
  5. services:
  6. nginx:
  7. image: nginx:latest
  8. restart: "no"
  9. volumes:
  10. - ./nginx/nginx.conf:/etc/nginx/nginx.conf
  11. - ./nginx/sites-enabled:/etc/nginx/sites-enabled
  12. - ./nginx/sites.template:/etc/nginx/sites-available/sites.template
  13. - ./nginx/default/html:/var/www/html
  14. - ./nginx/log/nginx:/var/log/nginx
  15. - ./data/certbot/conf:/etc/letsencrypt
  16. - ./data/certbot/www:/var/www/certbot
  17. ports:
  18. - "80:80"
  19. - "443:443"
  20. environment:
  21. - NGINX_HOSTNAME=${HOST_NAME:-sl.xlab.blindside-dev.com}
  22. depends_on:
  23. - scalelite.api
  24. command: /bin/bash -c "envsubst '$$NGINX_HOSTNAME' < /etc/nginx/sites-available/sites.template > /etc/nginx/sites-enabled/sites.conf && while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g 'daemon off;'"
  25. certbot:
  26. image: certbot/certbot
  27. volumes:
  28. - ./data/certbot/conf:/etc/letsencrypt
  29. - ./data/certbot/www:/var/www/certbot
  30. entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
  31. redis:
  32. image: redis
  33. restart: "no"
  34. ports:
  35. - 127.0.0.1:6379:6379
  36. volumes:
  37. - ./data/redis/:/data
  38. postgres:
  39. image: postgres:9.5
  40. restart: "no"
  41. ports:
  42. - 127.0.0.1:5432:5432
  43. volumes:
  44. - ./data/postgres/:/var/lib/postgresql/data
  45. environment:
  46. - PGHOST=postgres
  47. - PGDATABASE=postgres
  48. - PGUSER=postgres
  49. - PGPASSWORD=password
  50. scalelite.api:
  51. entrypoint: [bin/start]
  52. image: blindsidenetwks/scalelite:latest
  53. restart: "no"
  54. ports:
  55. - 127.0.0.1:3000:3000
  56. links:
  57. - redis
  58. - postgres
  59. volumes:
  60. - ./scalelite/log/api:/srv/scalelite/log
  61. - ./scalelite/bin/start:/srv/scalelite/bin/start
  62. - ./scalelite/config/database.yml:/srv/scalelite/config/database.yml
  63. - ./scalelite/tmp/pids/:/usr/src/app/tmp/pids
  64. - ./scalelite/tmp/sockets/:/usr/src/app/tmp/sockets
  65. - ./scalelite/tmp/cache/assets:/usr/src/app/tmp/cache/assets
  66. env_file: ./scalelite/.env
  67. environment:
  68. - REDIS_URL=redis://redis:6379
  69. - DB_HOST=postgres
  70. - DB_NAME=scalelite_production
  71. - DB_USERNAME=postgres
  72. - DB_PASSWORD=password
  73. - URL_HOST=${HOST_NAME:-sl.xlab.blindside-dev.com}
  74. scalelite.poller:
  75. entrypoint: [bin/start-poller]
  76. image: blindsidenetwks/scalelite:latest
  77. restart: "no"
  78. ports:
  79. - 127.0.0.1:3001:3000
  80. links:
  81. - redis
  82. volumes:
  83. - ./scalelite/log/poller:/srv/scalelite/log
  84. - ./scalelite/bin/start-poller:/srv/scalelite/bin/start-poller
  85. env_file: ./scalelite/.env
  86. environment:
  87. - REDIS_URL=redis://redis:6379
  88. - URL_HOST=${HOST_NAME:-sl.xlab.blindside-dev.com}
  89. - INTERVAL=60