fix: run test docker gateway on host network

This commit is contained in:
hajimi
2026-08-01 17:34:04 +08:00
parent 9e44df3a73
commit ebbcb7f007
5 changed files with 14 additions and 12 deletions
@@ -1,5 +1,5 @@
server {
listen 80;
listen 8000;
server_name _;
root /likeadmin_php/server/public;
index index.html index.htm index.php;
@@ -17,7 +17,7 @@ server {
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass host.docker.internal:9000;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /likeadmin_php/server/public$fastcgi_script_name;
}
+1 -7
View File
@@ -32,17 +32,11 @@ services:
restart: unless-stopped
depends_on:
- server
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "8000:80"
network_mode: host
volumes:
- ../server:/likeadmin_php/server:ro
- ./config/nginx/conf.d/sport-era.dev.conf:/etc/nginx/conf.d/default.conf:ro
- ./log/nginx/dev-logs:/logs
networks:
- sport-era-dev
admin:
image: node:20-alpine
working_dir: /app