Chever-John opened a new issue, #6800:
URL: https://github.com/apache/apisix/issues/6800
### Description
I want to deploy a service on my server (in Japan). Then I follow the steps
below.
# Config my service
select a dircetory example as `/problem`
Then I create a `docker-compose.yml` in `/problem`
The content in `docker-compose.yml` is
```yml
version: "3"
services:
miniflux:
image: miniflux/miniflux:latest
container_name: miniflux
restart: unless-stopped
ports:
- "8888:8080"
depends_on:
- db
- rsshub
environment:
-
DATABASE_URL=postgres://miniflux:somepass888@db/miniflux?sslmode=disable
- POLLING_FREQUENCY=15
- RUN_MIGRATIONS=1
db:
image: postgres:latest
container_name: postgres
restart: unless-stopped
environment:
- POSTGRES_USER=miniflux
- POSTGRES_PASSWORD=somepass888
volumes:
- miniflux-db:/var/lib/postgresql/data
rsshub:
image: diygod/rsshub:latest
container_name: rsshub
restart: unless-stopped
ports:
- "1200:1200"
environment:
NODE_ENV: production
CACHE_TYPE: redis
REDIS_URL: "redis://redis:6379/"
PUPPETEER_WS_ENDPOINT: "ws://browserless:3000"
depends_on:
- redis
- browserless
browserless:
image: browserless/chrome:latest
container_name: browserless
restart: unless-stopped
redis:
image: redis:alpine
container_name: redis
restart: unless-stopped
volumes:
- redis-data:/data
volumes:
miniflux-db:
redis-data:
```
Then I run the command `docker-compose up -d`.
I can now access my service by typing `x.x.x.x:8888` into my browser.
# Then I want to setup the APISIX to reverse the service
## Install APISIX
follow the steps:
```shell
git clone https://github.com/apache/apisix-docker.git
cd apisix-docker/example
docker-compose -p docker-apisix up -d
```
## Config APISIX
### First try
#### Create route
```shell
curl "http://127.0.0.1:9080/apisix/admin/routes/12" -H "X-API-KEY:
edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
{
"methods": ["GET"],
"uri": "/*",
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:8888": 1
}
}
}'
```
#### Request
```shell
curl -i -X GET "http://127.0.0.1:9080/"
```
#### Receive
`HTTP/1.1 502 Bad Gateway`
#### Expect
something `html` data.
### Second
#### Create route
```shell
curl "http://127.0.0.1:9080/apisix/admin/routes/12" -H "X-API-KEY:
edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
{
"methods": ["GET"],
"host": "rss.xxxxx.cn",
"uri": "/*",
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:8888": 1
}
}
}'
```
#### Request
curl -i "http://127.0.0.1:9080/" -H "Host: rss.xxxxx.cn"
#### Expect
something `html` data.
### Environment
- APISIX version (run `apisix version`): 2.13-alpine
- Operating system (run `uname -a`): Linux 5.4.0-100-generic #113-Ubuntu SMP
Thu Feb 3 18:43:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`): non because
of docker-compose installation
- etcd version, if relevant (run `curl
http://127.0.0.1:9090/v1/server_info`): non because of docker-compose
installation
- APISIX Dashboard version, if relevant:
- Plugin runner version, for issues related to plugin runners:
- LuaRocks version, for installation issues (run `luarocks --version`): non
because of docker-compose installation
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]