mscb402 commented on issue #8387:
URL: https://github.com/apache/apisix/issues/8387#issuecomment-1326933867
I try using `apache/apisix:3.0.0-debian` image, still, work for me.
docker compose config
```yaml
version: "3"
services:
apisix-dashboard:
image: apache/apisix-dashboard:2.13-alpine
restart: always
volumes:
- ./dashboard_conf/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml
ports:
- "9000:9000"
networks:
apisix:
apisix:
image: apache/apisix:3.0.0-debian
restart: always
volumes:
- ./apisix_log:/usr/local/apisix/logs
- ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
depends_on:
- etcd
##network_mode: host
ports:
- "9180:9180/tcp"
- "9080:9080/tcp"
- "9091:9091/tcp"
- "9443:9443/tcp"
- "9092:9092/tcp"
networks:
apisix:
etcd:
image: bitnami/etcd:3.4.15
restart: always
volumes:
- etcd_data:/bitnami/etcd
environment:
ETCD_ENABLE_V2: "true"
ALLOW_NONE_AUTHENTICATION: "yes"
ETCD_ADVERTISE_CLIENT_URLS: "http://0.0.0.0:2379"
ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
ports:
- "2379:2379/tcp"
networks:
apisix:
networks:
apisix:
driver: bridge
volumes:
etcd_data:
driver: local
```
post route config (your version)
```shell
curl -i -X POST \
-H "X-API-KEY:edd1c9f034335f136f87ad84b625c8f1" \
-H "Content-Type:application/json" \
-d \
'{
"uri": "/v3/bc8fdfcd-0392-49fa-8520-c8644d1688c8",
"name": "test",
"plugins": {
"file-logger": {
"path": "logs/file.log"
}
},
"upstream": {
"nodes": [
{
"host": "run.mocky.io",
"port": 443,
"weight": 1
}
],
"type": "roundrobin",
"hash_on": "vars",
"scheme": "https",
"pass_host": "pass"
},
"status": 1
}' \
'http://127.0.0.1:9180/apisix/admin/routes'
```
try access this route using curl
```
curl -i http://127.0.0.1:9080/v3/bc8fdfcd-0392-49fa-8520-c8644d1688c8
```
and look at file log
```json
➜ tail -n1 file.log
{"service_id":"","apisix_latency":1290.9998645782,"request":{"url":"http:\/\/127.0.0.1:9080\/v3\/bc8fdfcd-0392-49fa-8520-c8644d1688c8","querystring":{},"method":"GET","uri":"\/v3\/bc8fdfcd-0392-49fa-8520-c8644d1688c8","size":117,"headers":{"user-agent":"curl\/7.84.0","host":"127.0.0.1:9080","accept":"*\/*"}},"response":{"size":1629,"status":404,"headers":{"content-type":"text\/html;
charset=utf-8","x-clevercloudupgrade":"true","cache-control":"no-cache","server":"APISIX\/3.0.0","transfer-encoding":"chunked","connection":"close"}},"upstream_latency":1326,"route_id":"00000000000000000015","latency":2616.9998645782,"start_time":1669339166647,"upstream":"185.42.117.109:443","server":{"hostname":"4797f0986fd0","version":"3.0.0"},"client_ip":"172.20.0.1"}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]