您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

docker-compose.yml 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. - ./nginx/ssl/:/etc/ssl
  18. ports:
  19. - "80:80"
  20. - "443:443"
  21. environment:
  22. - NGINX_HOSTNAME=${HOST_NAME:-sl.xlab.blindside-dev.com}
  23. depends_on:
  24. - scalelite.api
  25. 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;'"
  26. ## Configuration for Letsencrypt SSL Certificate
  27. ## comment out when using an SSL Certificate from a CA other than Letsencrypt
  28. certbot:
  29. image: certbot/certbot
  30. volumes:
  31. - ./data/certbot/conf:/etc/letsencrypt
  32. - ./data/certbot/www:/var/www/certbot
  33. entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
  34. redis:
  35. image: redis:5.0-alpine
  36. restart: "no"
  37. ports:
  38. - 127.0.0.1:6379:6379
  39. volumes:
  40. - ./data/redis/:/data
  41. postgres:
  42. image: postgres:11.7-alpine
  43. restart: "no"
  44. ports:
  45. - 127.0.0.1:5432:5432
  46. volumes:
  47. - ./data/postgres/:/var/lib/postgresql/data
  48. environment:
  49. - POSTGRES_DB=postgres
  50. - POSTGRES_USER=postgres
  51. - POSTGRES_PASSWORD=password
  52. scalelite.api:
  53. entrypoint: [bin/start]
  54. image: blindsidenetwks/scalelite:latest
  55. restart: "no"
  56. ports:
  57. - 127.0.0.1:3000:3000
  58. links:
  59. - redis
  60. - postgres
  61. volumes:
  62. - ./scalelite/log/api:/srv/scalelite/log
  63. - ./scalelite/bin/start:/srv/scalelite/bin/start
  64. - ./scalelite/config/database.yml:/srv/scalelite/config/database.yml
  65. - ./scalelite/tmp/pids/:/usr/src/app/tmp/pids
  66. - ./scalelite/tmp/sockets/:/usr/src/app/tmp/sockets
  67. - ./scalelite/tmp/cache/assets:/usr/src/app/tmp/cache/assets
  68. env_file: ./scalelite/.env
  69. environment:
  70. - REDIS_URL=${REDIS_URL:-redis://redis:6379}
  71. - DATABASE_URL=${DATABASE_URL:-postgres://postgres:password@postgres:5432/scalelite?pool=5}
  72. - URL_HOST=${HOST_NAME:-sl.xlab.blindside-dev.com}
  73. scalelite.poller:
  74. entrypoint: [bin/start-poller]
  75. image: blindsidenetwks/scalelite:latest
  76. restart: "no"
  77. ports:
  78. - 127.0.0.1:3001:3000
  79. links:
  80. - redis
  81. volumes:
  82. - ./scalelite/log/poller:/srv/scalelite/log
  83. - ./scalelite/bin/start-poller:/srv/scalelite/bin/start-poller
  84. env_file: ./scalelite/.env
  85. environment:
  86. - REDIS_URL=${REDIS_URL:-redis://redis:6379}
  87. - URL_HOST=${HOST_NAME:-sl.xlab.blindside-dev.com}