no message

This commit is contained in:
kuaifan 2025-05-24 14:39:54 +08:00
parent 959f9454d8
commit aa4f7c8536
3 changed files with 28 additions and 1 deletions

View File

@ -84,6 +84,15 @@ class IndexController extends InvokeController
return Redirect::to(Base::fillUrl('api/system/version'), 301);
}
/**
* 健康检查
* @return string
*/
public function health()
{
return "ok";
}
/**
* 头像
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response|\Symfony\Component\HttpFoundation\BinaryFileResponse

View File

@ -22,6 +22,11 @@ services:
MYSQL_DB_NAME: "${DB_DATABASE}"
MYSQL_USERNAME: "${DB_USERNAME}"
MYSQL_PASSWORD: "${DB_PASSWORD}"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${LARAVELS_LISTEN_PORT}/health"]
interval: 5s
timeout: 5s
retries: 5
networks:
- extnetwork
depends_on:
@ -40,6 +45,14 @@ services:
volumes:
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./:/var/www
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/health"]
interval: 5s
timeout: 5s
retries: 5
depends_on:
php:
condition: service_healthy
networks:
- extnetwork
restart: unless-stopped
@ -91,6 +104,11 @@ services:
environment:
HOST_PWD: "${PWD}"
RUN_MODE: "strict"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/health"]
interval: 5s
timeout: 5s
retries: 5
networks:
- extnetwork
restart: unless-stopped

View File

@ -93,7 +93,7 @@ server {
proxy_set_header Server-Port $server_port;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_pass http://appstore:8080/;
proxy_pass http://appstore/;
}
include /var/www/docker/appstore/config/*/nginx.conf;