Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
- workflow_call

env:
REGISTRY: docker.io
IMAGE_NAME: ${{ github.repository }}
REGISTRY: ghcr.io
IMAGE_NAME: vamplabai/sgr-agent-core

jobs:
build-and-push:
Expand All @@ -23,12 +23,13 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
- name: Log in to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ github.token }}

- name: Extract metadata
id: meta
Expand Down
1 change: 1 addition & 0 deletions docker-compose.dist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ x-shared-logs: &shared-logs

services:
backend:
#image: ghcr.io/vamplabai/sgr-agent-core:latest
build:
context: .
dockerfile: Dockerfile
Expand Down
81 changes: 76 additions & 5 deletions docs/en/sgr-api/SGR-Quick-Start.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,78 @@ After starting both backend and frontend, you can access:

## Docker Deployment

### Environment Variables
### Using Pre-built Docker Image

The project provides pre-built Docker images published to GitHub Container Registry (ghcr.io). You can use these images directly without building from source.

#### Pull and Run the Image

```bash
# Pull the latest image
docker pull ghcr.io/vamplabai/sgr-agent-core:latest

# Run the container
docker run -d \
--name sgr-agent-backend \
-p 8010:8010 \
-v $(pwd)/config.yaml:/app/config.yaml:ro \
-v $(pwd)/agents.yaml:/app/agents.yaml:ro \
-v $(pwd)/logs:/app/logs \
-v $(pwd)/reports:/app/reports \
ghcr.io/vamplabai/sgr-agent-core:latest
```

#### Using Specific Version

You can also use a specific version tag:

```bash
# Pull a specific version
docker pull ghcr.io/vamplabai/sgr-agent-core:v1.0.0

# Run with specific version
docker run -d \
--name sgr-agent-backend \
-p 8010:8010 \
-v $(pwd)/config.yaml:/app/config.yaml:ro \
-v $(pwd)/agents.yaml:/app/agents.yaml:ro \
-v $(pwd)/logs:/app/logs \
-v $(pwd)/reports:/app/reports \
ghcr.io/vamplabai/sgr-agent-core:v1.0.0
```

#### Custom Configuration

You can override the default configuration file path:

```bash
docker run -d \
--name sgr-agent-backend \
-p 8010:8010 \
-e CONFIG_FILE=/app/config.yaml \
-v $(pwd)/my-config.yaml:/app/config.yaml:ro \
-v $(pwd)/my-agents.yaml:/app/agents.yaml:ro \
-v $(pwd)/logs:/app/logs \
-v $(pwd)/reports:/app/reports \
ghcr.io/vamplabai/sgr-agent-core:latest \
--config-file /app/config.yaml \
--agents-file /app/agents.yaml
```

#### Access URLs (Pre-built Image)

After starting the container, you can access:

- **Backend API:** http://localhost:8010
- Health check: http://localhost:8010/health
- Agents endpoint: http://localhost:8010/agents
- API endpoints: http://localhost:8010/v1/\*

### Building from Source

If you need to build the Docker image from source, you can use Docker Compose.

#### Environment Variables

Before deploying, you can configure the following environment variables (optional):

Expand All @@ -108,11 +179,11 @@ Before deploying, you can configure the following environment variables (optiona
- `FRONTEND_PORT` - Port for the frontend service (default: `5173`)
- `BACKEND_PORT` - Port for the backend service (default: `8010`)

### Deployment Steps
#### Deployment Steps

```bash
# 1. Go to the services folder
cd services
# 1. Copy docker-compose.dist.yaml to docker-compose.yaml
cp docker-compose.dist.yaml docker-compose.yaml

# 2. Building docker images
docker-compose build
Expand All @@ -121,7 +192,7 @@ docker-compose build
docker-compose up -d
```

### Access URLs (Docker Deployment)
#### Access URLs (Docker Compose)

After deployment, you can access:

Expand Down
81 changes: 76 additions & 5 deletions docs/ru/sgr-api/SGR-Quick-Start.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,78 @@ VITE_API_BASE_URL=http://localhost:8010 npm run dev

## Развертывание Docker

### Переменные окружения
### Использование готового Docker-образа

Проект предоставляет готовые Docker-образы, опубликованные в GitHub Container Registry (ghcr.io). Вы можете использовать эти образы напрямую без сборки из исходного кода.

#### Загрузка и запуск образа

```bash
# Загрузить последний образ
docker pull ghcr.io/vamplabai/sgr-agent-core:latest

# Запустить контейнер
docker run -d \
--name sgr-agent-backend \
-p 8010:8010 \
-v $(pwd)/config.yaml:/app/config.yaml:ro \
-v $(pwd)/agents.yaml:/app/agents.yaml:ro \
-v $(pwd)/logs:/app/logs \
-v $(pwd)/reports:/app/reports \
ghcr.io/vamplabai/sgr-agent-core:latest
```

#### Использование конкретной версии

Вы также можете использовать конкретную версию:

```bash
# Загрузить конкретную версию
docker pull ghcr.io/vamplabai/sgr-agent-core:v1.0.0

# Запустить с конкретной версией
docker run -d \
--name sgr-agent-backend \
-p 8010:8010 \
-v $(pwd)/config.yaml:/app/config.yaml:ro \
-v $(pwd)/agents.yaml:/app/agents.yaml:ro \
-v $(pwd)/logs:/app/logs \
-v $(pwd)/reports:/app/reports \
ghcr.io/vamplabai/sgr-agent-core:v1.0.0
```

#### Пользовательская конфигурация

Вы можете переопределить путь к файлу конфигурации по умолчанию:

```bash
docker run -d \
--name sgr-agent-backend \
-p 8010:8010 \
-e CONFIG_FILE=/app/config.yaml \
-v $(pwd)/my-config.yaml:/app/config.yaml:ro \
-v $(pwd)/my-agents.yaml:/app/agents.yaml:ro \
-v $(pwd)/logs:/app/logs \
-v $(pwd)/reports:/app/reports \
ghcr.io/vamplabai/sgr-agent-core:latest \
--config-file /app/config.yaml \
--agents-file /app/agents.yaml
```

#### URL для доступа (Готовый образ)

После запуска контейнера вы можете получить доступ:

- **Backend API:** http://localhost:8010
- Проверка здоровья: http://localhost:8010/health
- Endpoint агентов: http://localhost:8010/agents
- API endpoints: http://localhost:8010/v1/\*

### Сборка из исходного кода

Если вам нужно собрать Docker-образ из исходного кода, вы можете использовать Docker Compose.

#### Переменные окружения

Перед развертыванием вы можете настроить следующие переменные окружения (опционально):

Expand All @@ -108,11 +179,11 @@ VITE_API_BASE_URL=http://localhost:8010 npm run dev
- `FRONTEND_PORT` - Порт для frontend сервиса (по умолчанию: `5173`)
- `BACKEND_PORT` - Порт для backend сервиса (по умолчанию: `8010`)

### Шаги развертывания
#### Шаги развертывания

```bash
# 1. Перейдите в папку services
cd services
# 1. Скопируйте docker-compose.dist.yaml в docker-compose.yaml
cp docker-compose.dist.yaml docker-compose.yaml

# 2. Сборка docker образов
docker-compose build
Expand All @@ -121,7 +192,7 @@ docker-compose build
docker-compose up -d
```

### URL для доступа (Развертывание Docker)
#### URL для доступа (Docker Compose)

После развертывания вы можете получить доступ:

Expand Down