Hi,
I have a question which is quite similar to my previous question (Is it the target URL in API definition must be publicly reachable?).
Basically I have Tyk components running using Docker compose. When I add some public URL to my API definition, it works fine.
Now I have word press application running using Docker compose, and the Docker compose file is available here (WordPress samples). This application is running on http://localhost:8000.
Now when I create an API in Tyk, and pass this http://localhost:8000 to the target url, as I call this API, I got this ‘There was a problem proxying the request’ error message.
In my previous post, I got the suggestion to use ‘host.docker.internal’. So I added it in the Docker compose file. Here is the Docker compose file:
version: “2.2”
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
wordpress:
depends_on:
- db
image: wordpress:latest
volumes:
- wordpress_data:/var/www/html
ports:
- “8000:80”
restart: always
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
extra_hosts:
- “host.docker.internal: 172.17.0.1”
volumes:
db_data: {}
wordpress_data: {}
Did I miss anything in this Docker compose file? Anything I have to add/ change to solve this ‘There was a problem proxying the request’ problem?
Thanks and regards,
Maan Tarng