From 94193bea485347c157dbacf54131a2f52519e9c4 Mon Sep 17 00:00:00 2001 From: wwya Date: Wed, 29 Apr 2026 13:59:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20docker-compose/nginx/nginx?= =?UTF-8?q?.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose/nginx/nginx.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 docker-compose/nginx/nginx.yaml diff --git a/docker-compose/nginx/nginx.yaml b/docker-compose/nginx/nginx.yaml new file mode 100644 index 0000000..1ac680f --- /dev/null +++ b/docker-compose/nginx/nginx.yaml @@ -0,0 +1,29 @@ +version: '3.8' +services: + nginx: + image: nginx:1.28.2 + container_name: nginx + restart: always + ports: + - "80:80" + volumes: + - ./nginx.conf:/etc/nginx/nginx.conf + - ./conf.d:/etc/nginx/conf.d + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost/"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s + deploy: + resources: + limits: + cpus: '1' + memory: 1G + reservations: + cpus: '0.1' + memory: 256M + logging: + driver: json-file + options: + max-size: 500m \ No newline at end of file