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
148 changes: 0 additions & 148 deletions docker-compose.deploy.yml

This file was deleted.

14 changes: 13 additions & 1 deletion group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ s3_secure: "true"
postgres_db: telegram

# FFmpeg
ffmpeg_binary: ffmpeg
ffmpeg_cpulimit: 80
ffmpeg_threadslimit:

# LLM provider selection (gemini | openrouter)
extractor_provider: "openrouter"
embedder_provider: "gemini"

# Extracting configuration
extracting_separate_audio: false
extracting_video_slice_interval: 15


# Gemini embedding model
gemini_embedding_model: "gemini-embedding-2-preview"
Expand Down Expand Up @@ -56,3 +59,12 @@ telegram_service_port: 7002
webapp_service_port: 7003

webapp_base_url: "/.proxy/webapp-service"


# Secrets
s3_access_key:
s3_secret_key:
elastic_cloudid:
elastic_apikey:
gemini_api_key:
openrouter_api_key:
24 changes: 18 additions & 6 deletions roles/deploy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,27 @@
force: true
register: git_result

- name: Template .env file
- name: Template storage-service config file
template:
src: .env.j2
dest: "{{ deploy_path }}/.env"
src: storage-service-config.yaml.j2
dest: "{{ deploy_path }}/storage-service-config.yaml"
mode: "0600"

- name: Copy ansible docker-compose file
copy:
src: "{{ playbook_dir }}/docker-compose.deploy.yml"
- name: Template telegram-service config file
template:
src: telegram-service-config.yaml.j2
dest: "{{ deploy_path }}/telegram-service-config.yaml"
mode: "0600"

- name: Template webapp-service config file
template:
src: webapp-service-config.yaml.j2
dest: "{{ deploy_path }}/webapp-service-config.yaml"
mode: "0600"

- name: Template docker-compose file
template:
src: docker-compose.deploy.yml.j2
dest: "{{ deploy_path }}/docker-compose.deploy.yml"
mode: "0644"

Expand Down
67 changes: 0 additions & 67 deletions roles/deploy/templates/.env.j2

This file was deleted.

74 changes: 74 additions & 0 deletions roles/deploy/templates/docker-compose.deploy.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
services:
storage-service:
image: "ghcr.io/weoses/storage-service:{{ release_version | default('latest') }}"
restart: unless-stopped
ports:
- "127.0.0.1:{{ storage_service_port }}:{{ storage_service_port }}"
volumes:
- "./storage-service-config.yaml:/app/config.yaml"
networks:
- env
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:{{ storage_service_port }}/health"]
interval: 30s
timeout: 10s
retries: 6
start_period: 20s

postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: "{{ postgres_user }}"
POSTGRES_PASSWORD: "{{ postgres_password }}"
POSTGRES_DB: "{{ postgres_db }}"
ports:
- "127.0.0.1:5432:5432"
networks:
- env
volumes:
- "postgres_data:/var/lib/postgresql/data"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U '{{ postgres_user }}' -d '{{ postgres_db }}'"]
interval: 10s
timeout: 5s
retries: 5

telegram-service:
image: "ghcr.io/weoses/telegram-service:{{ release_version | default('latest') }}"
restart: unless-stopped
ports:
- "127.0.0.1:{{ telegram_service_port }}:{{ telegram_service_port }}"
volumes:
- "./telegram-service-config.yaml:/app/config.yaml"
networks:
- env
depends_on:
postgres:
condition: service_healthy
storage-service:
condition: service_healthy

webapp:
image: "ghcr.io/weoses/webapp-service:{{ release_version | default('latest') }}"
restart: unless-stopped
ports:
- "127.0.0.1:{{ webapp_service_port }}:{{ webapp_service_port }}"
volumes:
- "./webapp-service-config.yaml:/app/config.yaml"
networks:
- env
depends_on:
storage-service:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:{{ webapp_service_port }}/api/health"]
interval: 30s
timeout: 10s
retries: 6
start_period: 20s

networks:
env:

volumes:
postgres_data:
Loading