smocker-dev / smocker

Smocker is a simple and efficient HTTP mock server and proxy
https://smocker.dev
MIT License
1.14k stars 61 forks source link

unable to set SMOCKER_CONFIG_BASE_PATH in container install #270

Closed BinaryWorld2099 closed 1 year ago

BinaryWorld2099 commented 1 year ago

I was trying to set MOCKER_CONFIG_BASE_PATH=/smocker

docker run -d --restart=always -p 8080:8080 -p 8081:8081 -e SMOCKER_CONFIG_BASE_PATH=/smocker --name smocker thiht/smocker

result: image

image

gwleclerc commented 1 year ago

Hi, can you try to add a trailing / to your SMOCKER_CONFIG_BASE_PATH ? I'm prettry sure that it will work with

docker run -d --restart=always -p 8080:8080 -p 8081:8081 -e SMOCKER_CONFIG_BASE_PATH=/smocker/ --name smocker thiht/smocker
BinaryWorld2099 commented 1 year ago

Sorry, seems still not working with trailing / Similar result when try to deploy in minikube environment

http://localhost:8081/smocker http://localhost:8081/smocker/ http://localhost:8081/smocker/pages/mock

image image image

BinaryWorld2099 commented 1 year ago

In minikube and docker, only not setting SMOCKER_CONFIG_BASE_PATH was working

image image

BinaryWorld2099 commented 1 year ago

I am able to deploy in K8s environment now, with custom URL Below is my setting
Ingress: image image

thanks for you help