docker-compose.yml 462 B

123456789101112131415161718
  1. version: '3.8'
  2. services:
  3. nginx:
  4. container_name: my_nginx
  5. image: nginx:1.25-alpine
  6. ports:
  7. - "${NGINX_PORT:-8877}:80"
  8. volumes:
  9. - ./nginx.conf:/etc/nginx/nginx.conf:ro
  10. - ./element:/usr/share/nginx/html/element2:ro
  11. - ./v2.cn.vuejs.org:/usr/share/nginx/html/v2.cn.vuejs.org:ro
  12. restart: always
  13. healthcheck:
  14. test: ["CMD", "curl", "-f", "http://localhost"]
  15. interval: 30s
  16. timeout: 10s
  17. retries: 3