2
0

docker-compose.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. version: '3'
  2. services:
  3. loonflow-redis:
  4. hostname: loonflow-redis
  5. image: redis:latest
  6. restart: always
  7. ports:
  8. - 6379:6379
  9. command:
  10. redis-server --requirepass loonflow123
  11. loonflow-mysql:
  12. hostname: loonflow-mysql
  13. image: mysql:5.7
  14. volumes:
  15. - ./loonflow-mysql/data:/var/lib/mysql
  16. - ./loonflow-mysql/conf/my.cnf:/etc/my.cnf
  17. - ./loonflow-mysql/init:/docker-entrypoint-initdb.d
  18. restart: always
  19. ports:
  20. - 3306:3306
  21. environment:
  22. MYSQL_ROOT_PASSWORD: 327%aXtaz*z&
  23. secure_file_priv:
  24. loonflow-web:
  25. hostname: loonflow-web
  26. image: blackholll/loonflow-web:latest
  27. volumes:
  28. - ./loonflow-media:/var/loonflow-media
  29. depends_on:
  30. - loonflow-redis
  31. - loonflow-mysql
  32. ports:
  33. - 80:80
  34. environment:
  35. DB_HOST: loonflow-mysql
  36. DB_USER: loonflow
  37. DB_PASS: 2Nir9D6&muYq
  38. REDIS_HOST: loonflow-redis
  39. REDIS_PASS: loonflow123
  40. command:
  41. - /bin/sh
  42. - -c
  43. - |
  44. /opt/venv/loonflow/bin/uwsgi /opt/loonflow/uwsgi.ini
  45. /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf -g "daemon off;"
  46. loonflow-task:
  47. hostname: loonflow-task
  48. image: blackholll/loonflow-task:latest
  49. depends_on:
  50. - loonflow-redis
  51. - loonflow-mysql
  52. environment:
  53. DB_NAME: loonflow
  54. DB_HOST: loonflow-mysql
  55. DB_USER: loonflow
  56. DB_PASS: 2Nir9D6&muYq
  57. REDIS_HOST: loonflow-redis
  58. REDIS_PASS: loonflow123
  59. command:
  60. - /bin/sh
  61. - -c
  62. - |
  63. cd /opt/loonflow
  64. /opt/venv/loonflow/bin/celery -A tasks worker -l info -c 8 -Q loonflow