Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
Add pgadmin and internal_access containers as components
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhail-treskin committed Sep 6, 2023
1 parent 54178a6 commit 39c1c78
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/internal_access/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM python:latest
COPY ../../cvat_scripts/cvat_tasks/requirements.txt /tmp/requirements.txt
RUN pip install psycopg2-binary -r /tmp/requirements.txt
19 changes: 19 additions & 0 deletions components/internal_access/docker-compose.entry_point.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
services:
internal_access:
container_name: internal_access
build: ./components/internal_access
restart: always
networks:
- cvat
logging:
driver: "json-file"
options:
max-size: 100m
max-file: "3"
volumes:
- ../../cvat_scripts/cvat_tasks:/home/cvat_tasks
environment:
- CVAT_INTERNALS=1
stdin_open: true
tty: true

3 changes: 3 additions & 0 deletions components/pg_admin/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM dpage/pgadmin4
COPY ./server_config.json /tmp
RUN source /venv/bin/activate && python3 /pgadmin4/setup.py --load-servers /tmp/server_config.json --user [email protected]
24 changes: 24 additions & 0 deletions components/pg_admin/docker-compose.pg_admin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
services:
pgadmin:
container_name: pg_admin
build: ./components/pg_admin
restart: always
depends_on:
- cvat_db
networks:
- cvat
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
ports:
- "8888:80"
logging:
driver: "json-file"
options:
max-size: 100m
max-file: "3"
volumes:
- pgadmin-data:/var/lib/pgadmin
volumes:
pgadmin-data:

22 changes: 22 additions & 0 deletions components/pg_admin/server_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"Servers": {
"1": {
"Name": "cvat",
"Group": "Servers",
"Host": "cvat_db",
"Port": 5432,
"MaintenanceDB": "postgres",
"Username": "root",
"UseSSHTunnel": 0,
"TunnelPort": "22",
"TunnelAuthentication": 0,
"KerberosAuthentication": false,
"ConnectionParameters": {
"sslmode": "prefer",
"connect_timeout": 10,
"sslcert": "<STORAGE_DIR>/.postgresql/postgresql.crt",
"sslkey": "<STORAGE_DIR>/.postgresql/postgresql.key"
}
}
}
}

0 comments on commit 39c1c78

Please sign in to comment.