GET Query Parameters is not forwarded to docker container
rizkyarlin opened this issue · comments
I deployed my apps to my production server in AWS EC2 (Standard Ubuntu VPS)
When I tried to access it with the public IP, the query params seems not forwarded. The log is 180.252.8.xxx:58693 - "GET /get_total_order HTTP/1.1" 200 OK
. The port part is always different every time I accessed it through public IP
but when I ssh-ed to the server and do curl http://localhost/get_total_order?status=aaaaaa&start_date=2000-01-01&end_date=2020-05-20
, it's working.
My Dockerfile:
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.7
COPY ./app /app/app
COPY ./requirement.txt /app/requirement.txt
RUN pip install -r requirement.txt
COPY ./octopus-data-gcp.json /app
My docker-compose.yml:
version: "3"
services:
web:
image: api_dashboard_production:latest
build:
context: .
dockerfile: Dockerfile.production
container_name: api_dashboard_production
env_file:
- .env
command: bash -c "uvicorn app.main:app --host 0.0.0.0 --port 80"
ports:
- "80:80"
The port part is weird, so I think it's routed through AWS internal network and the parameter is dropped, but I'm not sure. Any Ideas?
I'm going to open AWS support ticket. But I asked anyway in case someone runs into the same problem.
Thanks!
Suddenly it works. Probably AWS problem.
Thanks for reporting back and closing the issue