Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ai-svc to docker-compose #4

Merged
merged 1 commit into from
Oct 31, 2024
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
7 changes: 7 additions & 0 deletions db/create-onecx-databases.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@ DROP DATABASE IF EXISTS "onecx-chat";
CREATE USER onecx_chat WITH PASSWORD 'onecx_chat';
CREATE DATABASE "onecx-chat" WITH OWNER = onecx_chat;

/*
ai-specific part not required if use only onecx-chat-svc
*/
DROP DATABASE IF EXISTS "onecx-ai";
DROP ROLE IF EXISTS onecx_ai;
CREATE USER onecx_ai WITH PASSWORD 'onecx_ai';
CREATE DATABASE "onecx-ai" WITH OWNER = onecx_ai;
40 changes: 28 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
services:
postgresdb:
image: postgres
image: bitnami/postgresql:12
networks:
- onecx-net
environment:
POSTGRES_PASSWORD: admin
# POSTGRES_DB: postgres
Expand All @@ -14,26 +16,40 @@ services:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 10s
retries: 5
retries: 5

onecx-chat-svc:
# image: ghcr.io/onecx-apps/onecx-chat-svc:0.0.0-rc.16
image: localhost/onecx-chat-svc:999-SNAPSHOT
networks:
- onecx-net
environment:
QUARKUS_DATASOURCE_USERNAME: onecx_chat
QUARKUS_DATASOURCE_PASSWORD: onecx_chat
QUARKUS_DATASOURCE_USERNAME: onecx_chat
QUARKUS_DATASOURCE_PASSWORD: onecx_chat
QUARKUS_DATASOURCE_JDBC_URL: "jdbc:postgresql://postgresdb:5432/onecx-chat?sslmode=disable"
QUARKUS_REST_CLIENT_ONECX_AI_SVC_URL: "http://onecx-ai-svc:8080/internal/ai/"
ports:
- "8081:8080"
depends_on:
postgresdb:
condition: service_healthy


# onecx-ai-svc:
# image: onecx-ai
# ports:
# - "8080:80"


onecx-ai-svc:
image: localhost/onecx-ai-quarkus-svc:999-SNAPSHOT
networks:
- onecx-net
environment:
QUARKUS_DATASOURCE_USERNAME: onecx_ai
QUARKUS_DATASOURCE_PASSWORD: onecx_ai
QUARKUS_DATASOURCE_JDBC_URL: "jdbc:postgresql://postgresdb:5432/onecx-ai?sslmode=disable"
ports:
- "8080:8080"
depends_on:
postgresdb:
condition: service_healthy

volumes:
postgres:
postgres:
networks:
onecx-net:
driver: bridge
Loading