docker-compose.yml 645 B

1234567891011121314151617181920212223242526272829
  1. version: "3" # docker版本对应的docker-compose版本
  2. services:
  3. captcha:
  4. container_name: pycaptcha
  5. image: pycaptcha:latest
  6. volumes:
  7. - /mnt/pycaptcha:/mnt
  8. # network_mode: "host"
  9. ports:
  10. - "2119:2119"
  11. restart: always
  12. ulimits:
  13. core: 0 # 禁止生成core文件
  14. tmpfs:
  15. - /tmp
  16. env_file:
  17. - ./web.env
  18. privileged: true
  19. shm_size: 10GB
  20. logging:
  21. driver: "json-file"
  22. options:
  23. max-size: "500M"
  24. max-file: "1"
  25. deploy:
  26. resources:
  27. limits:
  28. memory: 10G
  29. command: 'python3 -m gunicorn -c gunicorn.conf.py captcha_server:app'