docker-compose.yml 953 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. version: '2.0'
  2. services:
  3. nginx:
  4. build:
  5. context: ./lims-frontend/
  6. dockerfile: ./Dockerfile
  7. ports:
  8. - 8002:8002
  9. web:
  10. build: .
  11. command: python manage.py runserver 0.0.0.0:8003
  12. volumes:
  13. - .:/code
  14. ports:
  15. - 8003:8003
  16. depends_on:
  17. - db
  18. db:
  19. image: mysql:8.0.26
  20. restart: always
  21. #command: --default-authentication-plugin=mysql_native_password && --innodb_use_native_aio=0
  22. command: --innodb_use_native_aio=0
  23. environment:
  24. - MYSQL_HOST=0.0.0.0
  25. - MYSQL_PORT=3306
  26. - MYSQL_DATABASE=TestLaboratory
  27. - MYSQL_ROOT_PASSWORD=liufan3344
  28. ports:
  29. - 33061:3306
  30. volumes:
  31. # - data:/var/lib/mysql
  32. - ./mysql-init:/docker-entrypoint-initdb.d/
  33. # volumes:
  34. # - ./db:/var/lib/mysql
  35. # - ./mysql/init:/docker-entrypoint-initdb.d/
  36. # depends_on:
  37. # - db_init
  38. # db_init:
  39. # command: --default-authentication-plugin=mysql_native_password