docker-compose.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. command: bash -c "/bin/bash /opt/walle-web/admin.sh migration && python /opt/walle-web/waller.py"
  25. expose:
  26. - "5000"
  27. links:
  28. - db
  29. depends_on:
  30. - db
  31. networks:
  32. - walle-net
  33. restart: always
  34. db:
  35. image: mysql
  36. container_name: walle-mysql
  37. hostname: walle-mysql
  38. ports:
  39. - "3306:3306"
  40. expose:
  41. - "3306"
  42. command: --default-authentication-plugin=mysql_native_password
  43. environment:
  44. MYSQL_ROOT_PASSWORD: walle
  45. MYSQL_DATABASE: walle
  46. volumes:
  47. - /data/walle/mysql:/var/lib/mysql
  48. networks:
  49. - walle-net
  50. restart: always
  51. networks:
  52. walle-net:
  53. driver: bridge