hashicorp / hashicorp/consul

How to use CONSUL_ API_ PREFIX?

Open
#18,283 1 comment 1 reaction 0 assignees View on GitHub
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
```
![image](https://github.com/hashicorp/consul/assets/18181270/903c2d75-a07c-42da-ba14-45fe506fa523)

The api url has not changed
![image](https://github.com/hashicorp/consul/assets/18181270/aa2217f9-b3e7-4538-994b-ff7bef1371d6)

What should I do?

Contributor guide

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.