Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

docker-compose.yml 2.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. - DATABASE_URL=postgres://postgres:password@postgres:5432/scalelite?pool=5
  70. - URL_HOST=${HOST_NAME:-sl.xlab.blindside-dev.com}
  71. scalelite.poller:
  72. entrypoint: [bin/start-poller]
  73. image: blindsidenetwks/scalelite:latest
  74. restart: "no"
  75. ports:
  76. - 127.0.0.1:3001:3000
  77. links:
  78. - redis
  79. volumes:
  80. - ./scalelite/log/poller:/srv/scalelite/log
  81. - ./scalelite/bin/start-poller:/srv/scalelite/bin/start-poller
  82. env_file: ./scalelite/.env
  83. environment:
  84. - REDIS_URL=redis://redis:6379
  85. - URL_HOST=${HOST_NAME:-sl.xlab.blindside-dev.com}