How to use CONSUL_ API_ PREFIX?
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 39
Description
I set the environment variable CONSUL_ API_ PREFIX, but it doesn't seem to be working
consul 1.16.0
server centos7
docker-compose.yml:
```
version: '3'
services:
consul:
image: consul
container_name: consul
environment:
CONSUL_API_PREFIX: consul/
volumes:
- ./consul/config:/consul/config
- ./consul/data:/consul/data
ports:
- "8500:8500"
- "8600:8600/tcp"
- "8600:8600/udp"
nginx:
image: nginx
container_name: nginx
volumes:
- ./nginx/config/conf.d/:/etc/nginx/conf.d/
- ./nginx/log:/var/log/nginx
- ./nginx/html:/usr/share/nginx/html
ports:
- 80:80
```

The api url has not changed

What should I do?
Contributor guide
Research direction
Start by reviewing the CONSUL_API_PREFIX setting in the provided docker-compose.yml and checking how Consul 1.16.0 documents or applies that variable. Compare the configured value with the API URL shown in the report; done means determining why the URL does or does not receive the expected prefix and documenting the required configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose
- Domain
- api, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100