Description
I am using the most recent docker-compose file to build images including cvat_proxy server which exposes port 8080 (0.2.0-503-gec2fa6e).
Containers are running successfully on EC2 server to which ELB is attached and checks health on port 8080. There are target group and security group in place as well that control traffic.
Docker-compose file is the same as the new default version with the only difference that "CVAT_HOST" was changed to ".amazonaws.com" from "localhost" (Previous AWS deployment instruction to create docker-compose.override.yml is not applicable to new docker-compose which runs CVAT on single port 8080)
Here are the runnings containers:
When I curl ELB DNS like "curl -ivk ELB_DNS" from inside the server, code 200 is returned as following meaning I can reach CVAT from inside:
But when I try to get to CVAT from outside, i.e., local machine, it fails with code 404. The following is the logs of nginx container:
The green highlighted line is the curl output from inside server (code 200) whereas the other ones are from outside associated with ELB with 404 code. Have tried CVAT_HOST with EC2 IP address, ELB DNS, ELB IP but none of them worked out to reach to CVAT login page.
Any ideas/suggestions are appreciated.
Here are the contents of my docker-compose.yml file:
services:
cvat_db:
container_name: cvat_db
image: postgres:10-alpine
networks:
default:
aliases:
- db
restart: always
environment:
POSTGRES_USER: root
POSTGRES_DB: cvat
POSTGRES_HOST_AUTH_METHOD: trust
volumes:
- cvat_db:/var/lib/postgresql/data
cvat_redis:
container_name: cvat_redis
image: redis:4.0-alpine
networks:
default:
aliases:
- redis
restart: always
cvat:
container_name: cvat
image: cvat
restart: always
depends_on:
- cvat_redis
- cvat_db
build:
context: .
args:
http_proxy:
https_proxy:
no_proxy:
socks_proxy:
TF_ANNOTATION: "no"
AUTO_SEGMENTATION: "no"
USER: "django"
DJANGO_CONFIGURATION: "production"
TZ: "Etc/UTC"
OPENVINO_TOOLKIT: "no"
environment:
DJANGO_MODWSGI_EXTRA_ARGS: ""
ALLOWED_HOSTS: '*'
volumes:
- cvat_data:/home/django/data
- cvat_keys:/home/django/keys
- cvat_logs:/home/django/logs
- cvat_models:/home/django/models
cvat_ui:
container_name: cvat_ui
restart: always
build:
context: .
args:
http_proxy:
https_proxy:
no_proxy:
socks_proxy:
dockerfile: Dockerfile.ui
networks:
default:
aliases:
- ui
depends_on:
- cvat
cvat_proxy:
container_name: cvat_proxy
image: nginx:stable-alpine
restart: always
depends_on:
- cvat
- cvat_ui
environment:
CVAT_HOST: .amazonaws.com
ports:
- "8080:80"
volumes:
- ./cvat_proxy/nginx.conf:/etc/nginx/nginx.conf:ro
- ./cvat_proxy/conf.d/cvat.conf.template:/etc/nginx/conf.d/cvat.conf.template:ro
command: /bin/sh -c "envsubst '$$CVAT_HOST' < /etc/nginx/conf.d/cvat.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"