Skip to content

Commit 0ec0203

Browse files
authored
fix: Start gateway with user 1337 to fix the log rotating permission issue (#218)
1 parent f5a5271 commit 0ec0203

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

compose/docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ services:
183183
gateway:
184184
hostname: higress-gateway
185185
image: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/gateway:${HIGRESS_GATEWAY_TAG}
186+
user: "1337:1337"
186187
command:
187188
- proxy
188189
- router
@@ -225,6 +226,8 @@ services:
225226
- ./volumes/gateway/podinfo:/etc/istio/pod:ro
226227
- ./volumes/gateway/istio/data:/var/lib/istio/data:rw
227228
- ./volumes/gateway/log:/var/log/proxy:rw
229+
- ./volumes/gateway/secrets:/var/run/secrets:rw
230+
- ./volumes/gateway/proxy:/etc/istio/proxy:rw
228231

229232
console:
230233
hostname: higress-console

compose/scripts/prepare.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,11 @@ EOF
379379

380380
mkdir -p $VOLUMES_ROOT/gateway/istio/data
381381

382+
mkdir -p $VOLUMES_ROOT/gateway/secrets
383+
mkdir -p $VOLUMES_ROOT/gateway/proxy
382384
mkdir -p $VOLUMES_ROOT/gateway/log
383385
touch $VOLUMES_ROOT/gateway/log/access.log
386+
chmod a+w -R $VOLUMES_ROOT/gateway
384387

385388
checkConfigExists "higress-system" "networking.istio.io/v1alpha3" "envoyfilters" "higress-gateway-global-custom-response"
386389
if [ $? -ne 0 ]; then

0 commit comments

Comments
 (0)