2
0

docker-compose.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. depends_on:
  28. - loonflow-redis
  29. - loonflow-mysql
  30. ports:
  31. - 80:80
  32. environment:
  33. DB_HOST: loonflow-mysql
  34. DB_USER: loonflow
  35. DB_PASS: 2Nir9D6&muYq
  36. REDIS_HOST: loonflow-redis
  37. REDIS_PASS: loonflow123
  38. command:
  39. - /bin/sh
  40. - -c
  41. - |
  42. /opt/venv/loonflow/bin/uwsgi /opt/loonflow/uwsgi.ini
  43. /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf -g "daemon off;"
  44. loonflow-task:
  45. hostname: loonflow-task
  46. image: blackholll/loonflow-task:latest
  47. depends_on:
  48. - loonflow-redis
  49. - loonflow-mysql
  50. environment:
  51. DB_NAME: loonflow
  52. DB_HOST: loonflow-mysql
  53. DB_USER: loonflow
  54. DB_PASS: 2Nir9D6&muYq
  55. REDIS_HOST: loonflow-redis
  56. REDIS_PASS: loonflow123
  57. command:
  58. - /bin/sh
  59. - -c
  60. - |
  61. cd /opt/loonflow
  62. /opt/venv/loonflow/bin/celery -A tasks worker -l info -c 8 -Q loonflow