docker-compose.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. version: '3.7'
  2. services:
  3. web:
  4. image: alenx/walle-web:2.0
  5. container_name: walle-nginx
  6. hostname: nginx-web
  7. ports:
  8. # 如果宿主机80端口被占用,可自行修改为其他port(>=1024)
  9. # 0.0.0.0:要绑定的宿主机端口:docker容器内端口80
  10. - "80:80"
  11. links:
  12. - python
  13. depends_on:
  14. - python
  15. networks:
  16. - walle-net
  17. restart: always
  18. python:
  19. image: alenx/walle-python:2.0
  20. container_name: walle-python
  21. hostname: walle-python
  22. volumes:
  23. - /tmp/walle/codebase/:/tmp/walle/codebase/
  24. - /tmp/walle/logs/:/opt/walle-web/logs/
  25. - /root/.ssh:/root/.ssh/
  26. command: bash -c "cd /opt/walle-web/ && /bin/bash admin.sh migration && python /opt/walle-web/waller.py"
  27. expose:
  28. - "5000"
  29. links:
  30. - db
  31. depends_on:
  32. - db
  33. networks:
  34. - walle-net
  35. restart: always
  36. db:
  37. image: mysql
  38. container_name: walle-mysql
  39. hostname: walle-mysql
  40. ports:
  41. - "3306:3306"
  42. expose:
  43. - "3306"
  44. command: --default-authentication-plugin=mysql_native_password
  45. environment:
  46. MYSQL_ROOT_PASSWORD: walle
  47. MYSQL_DATABASE: walle
  48. volumes:
  49. - /data/walle/mysql:/var/lib/mysql
  50. networks:
  51. - walle-net
  52. restart: always
  53. networks:
  54. walle-net:
  55. driver: bridge