Last active
May 16, 2024 04:45
-
-
Save adamsau/e0a5f59923977f9fefd10c5b3d11322c to your computer and use it in GitHub Desktop.
computer vision annotation tool (CVAT) nginx docker-compose yml (release-2.1)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name _ default; | |
return 404; | |
} | |
server { | |
listen 80; | |
server_name ${CVAT_HOST}; | |
proxy_pass_header X-CSRFToken; | |
proxy_set_header Host $http_host; | |
proxy_pass_header Set-Cookie; | |
location ~* /api/.*|git/.*|opencv/.*|analytics/.*|static/.*|admin(?:/(.*))?.*|documentation/.*|django-rq(?:/(.*))? { | |
proxy_pass http://cvat:8080; | |
} | |
location / { | |
proxy_pass http://cvat_ui; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright (C) 2018-2021 Intel Corporation | |
# | |
# SPDX-License-Identifier: MIT | |
# | |
version: '3.3' | |
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: openvino/cvat_server | |
restart: always | |
depends_on: | |
- cvat_redis | |
- cvat_db | |
environment: | |
DJANGO_MODWSGI_EXTRA_ARGS: '' | |
ALLOWED_HOSTS: '*' | |
CVAT_REDIS_HOST: 'cvat_redis' | |
CVAT_POSTGRES_HOST: 'cvat_db' | |
ADAPTIVE_AUTO_ANNOTATION: 'false' | |
volumes: | |
- cvat_data:/home/django/data | |
- cvat_keys:/home/django/keys | |
- cvat_logs:/home/django/logs | |
cvat_ui: | |
container_name: cvat_ui | |
image: openvino/cvat_ui | |
restart: always | |
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: localhost | |
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;'" | |
cvat_opa: | |
container_name: cvat_opa | |
image: openpolicyagent/opa:0.34.2-rootless | |
restart: always | |
networks: | |
default: | |
aliases: | |
- opa | |
volumes: | |
- ./cvat/apps/iam/rules:/rules | |
ports: | |
- '8181:8181' | |
command: run --server --addr :8181 --set=decision_logs.console=true /rules | |
networks: | |
default: | |
ipam: | |
driver: default | |
config: | |
- subnet: 172.28.0.0/24 | |
volumes: | |
cvat_db: | |
cvat_data: | |
cvat_keys: | |
cvat_logs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 2; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
sendfile on; | |
keepalive_timeout 65; | |
# For long domain names (e.g. AWS hosts) | |
server_names_hash_bucket_size 128; | |
include /etc/nginx/conf.d/*.conf; | |
client_max_body_size 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
file put at ./cvat_proxy/nginx.conf
file put at ./cvat_proxy/conf.d/cvat.conf.template