docker-compose.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. version: "3"
  2. services:
  3. nginx:
  4. image: nginx:1.20.2
  5. ports:
  6. - "9100:80"
  7. volumes:
  8. - "./nginx/dist:/usr/share/nginx/html"
  9. - "./nginx/conf/nginx.conf:/etc/nginx/nginx.conf:ro"
  10. links:
  11. - adminNet
  12. mysql:
  13. image: mysql:5.7
  14. ports:
  15. - 9101:3306
  16. restart: unless-stopped
  17. privileged: true
  18. ulimits:
  19. nproc: 655350
  20. nofile:
  21. soft: 131072
  22. hard: 400000
  23. #healthcheck:
  24. # test: "/usr/bin/mysql --user=root --password=root --execute \"SHOW DATABASES;\""
  25. # interval: 10s # 间隔时间
  26. # timeout: 3s # 超时时间
  27. # retries: 50 # 重试次数
  28. environment:
  29. MYSQL_ROOT_HOST: "%"
  30. MYSQL_DATABASE: admin
  31. MYSQL_ROOT_PASSWORD: root
  32. volumes:
  33. - ./mysql/mysql:/var/lib/mysql
  34. - ./mysql/mysql.cnf:/etc/mysql/conf.d/mysql.cnf
  35. adminNet:
  36. image: mcr.microsoft.com/dotnet/aspnet:6.0
  37. ports:
  38. - "9102:5050"
  39. volumes:
  40. - "./app:/app"
  41. working_dir: /app
  42. command: ["/app/wait-for-it.sh", "mysql:3306", "-t", "120", "--","dotnet", "Admin.NET.Web.Entry.dll"]
  43. depends_on:
  44. - mysql