docker-compose.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. version: '2.0'
  2. services:
  3. nginx:
  4. build:
  5. context: ./lims-frontend/
  6. dockerfile: ./Dockerfile
  7. ports:
  8. - 8002:8002
  9. networks:
  10. lims_net:
  11. ipv4_address: 172.26.0.13
  12. web:
  13. build: .
  14. command: python manage.py runserver 0.0.0.0:8003
  15. volumes:
  16. - .:/code
  17. ports:
  18. - 8003:8003
  19. depends_on:
  20. - db
  21. networks:
  22. lims_net:
  23. ipv4_address: 172.26.0.14
  24. db:
  25. image: mysql:8.0.26
  26. restart: always
  27. #command: --default-authentication-plugin=mysql_native_password && --innodb_use_native_aio=0
  28. command: --innodb_use_native_aio=0
  29. environment:
  30. - MYSQL_HOST=0.0.0.0
  31. - MYSQL_PORT=3306
  32. - MYSQL_DATABASE=TestLaboratory
  33. - MYSQL_ROOT_PASSWORD=liufan3344
  34. ports:
  35. - 33061:3306
  36. volumes:
  37. # - data:/var/lib/mysql
  38. - ./mysql-init:/docker-entrypoint-initdb.d/
  39. networks:
  40. lims_net:
  41. ipv4_address: 172.26.0.12
  42. networks:
  43. lims_net:
  44. ipam:
  45. config:
  46. - subnet: 172.26.0.0/16
  47. # volumes:
  48. # - ./db:/var/lib/mysql
  49. # - ./mysql/init:/docker-entrypoint-initdb.d/
  50. # depends_on:
  51. # - db_init
  52. # db_init:
  53. # command: --default-authentication-plugin=mysql_native_password