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
22 changes: 18 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,23 @@ jobs:
"docker rmi iceknight07/open-chat:latest || true"
ssh -i ~/.ssh/private.key ${{ vars.DEPLOY_USER }}@${{ vars.DEPLOY_HOST }} \
"docker run --name open-chat-server --network=open-chat-network -p 443:8443 -d \
-e POSTGRES_URL=open-chat-postgres:5432/open_chat \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=12345678 \
-e KMS_URL=ws://kurento-media-server:8888/kurento \
-e SPRING_PROFILES_ACTIVE=production \
-e POSTGRES_URL=${{ secrets.POSTGRES_URL }} \
-e POSTGRES_USER=${{ secrets.POSTGRES_USER }} \
-e POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} \
-e KMS_URL=${{ secrets.KMS_URL }} \
-e AWS_ACCESS_KEY=${{ secrets.AWS_ACCESS_KEY }} \
-e AWS_SECRET_KEY=${{ secrets.AWS_SECRET_KEY }} \
-e AWS_REGION=${{ vars.REGION }} \
-e ATTACHMENTS_BUCKET=${{ vars.ATTACHMENTS_BUCKET }} \
-e RECORDINGS_BUCKET=${{ vars.RECORDINGS_BUCKET }} \
-e TRANSCRIPTS_BUCKET=${{ vars.TRANSCRIPTS_BUCKET }} \
-e COGNITO_USER_POOL_ID=${{ secrets.COGNITO_USER_POOL_ID }} \
-e COGNITO_APP_CLIENT_ID=${{ secrets.COGNITO_APP_CLIENT_ID }} \
-e COGNITO_APP_CLIENT_SECRET=${{ secrets.COGNITO_APP_CLIENT_SECRET }} \
-e JWKS_URL=${{ secrets.JWKS_URL }} \
-e OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} \
-e GEMINI_API_KEY=${{ secrets.GEMINI_API_KEY }} \
-e FIREBASE_CONFIGURATION_JSON=${{ secrets.FIREBASE_CONFIGURATION_JSON }} \
-e SSL_KEY_STORE_PASSWORD=${{ secrets.SSL_KEY_STORE_PASSWORD }} \
iceknight07/open-chat:latest"
2 changes: 0 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ dependencies {
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1'


runtimeOnly("com.mysql:mysql-connector-j")
runtimeOnly("org.postgresql:postgresql")
implementation 'org.flywaydb:flyway-core:10.10.0'
implementation "org.flywaydb:flyway-database-postgresql:10.10.0"
Expand Down
12 changes: 0 additions & 12 deletions docker-compose/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@ services:
volumes:
- rabbitmq-data:/var/lib/rabbitmq

open-chat-mysql:
image: mysql:8.0.22
container_name: open-chat-mysql
hostname: open-chat-mysql
environment:
- MYSQL_ROOT_PASSWORD=123456
- MYSQL_DATABASE=open_chat
ports:
- '3310:3306'
volumes:
- local-mysql-data:/var/lib/mysql

open-chat-postgres:
container_name: open-chat-postgres
hostname: open-chat-postgres
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ import javax.annotation.PostConstruct
@Service
class FCMInitializer {

@Value("\${app.firebase-configuration-file}")
private val firebaseConfigPath: String? = null
@Value("\${app.firebase-configuration-json}")
private val firebaseConfigJson: String? = null

var logger: Logger = LoggerFactory.getLogger(FCMInitializer::class.java)

@PostConstruct
fun initialize() {
try {
val options = FirebaseOptions.builder()
.setCredentials(GoogleCredentials.fromStream(ClassPathResource(firebaseConfigPath!!).getInputStream()))
.setCredentials(GoogleCredentials.fromStream(firebaseConfigJson!!.byteInputStream()))
.build()
if (FirebaseApp.getApps().isEmpty()) {
FirebaseApp.initializeApp(options)
Expand Down
30 changes: 29 additions & 1 deletion src/main/resources/application-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,41 @@ spring:
username: ${POSTGRES_USER}
password: ${POSTGRES_PASSWORD}

aws:
access-key: ${AWS_ACCESS_KEY}
secret-key: ${AWS_SECRET_KEY}
region: ${AWS_REGION}
attachments-bucket: ${ATTACHMENTS_BUCKET}
recordings-bucket: ${RECORDINGS_BUCKET}
transcripts-bucket: ${TRANSCRIPTS_BUCKET}
cognito:
user-pool-id: ${COGNITO_USER_POOL_ID}
app-client-id: ${COGNITO_APP_CLIENT_ID}
app-client-secret: ${COGNITO_APP_CLIENT_SECRET}

jwks:
url: ${JWKS_URL}

openai:
model: gpt-3.5-turbo-0301
api:
url: https://api.openai.com/v1/chat/completions
key: ${OPENAI_API_KEY}

gemini:
api:
key: ${GEMINI_API_KEY}
url: https://generativelanguage.googleapis.com/v1beta/models
app:
firebase-configuration-json: ${FIREBASE_CONFIGURATION_JSON}

kms:
url: ${KMS_URL}

server:
ssl:
key-store: classpath:keystore.p12
key-store-password: 12345678
key-store-password: ${SSL_KEY_STORE_PASSWORD}
key-store-type: PKCS12
key-alias: tomcat
port: 8443
40 changes: 16 additions & 24 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,35 @@ spring:
password: 123456
jpa:
database-platform: org.hibernate.dialect.PostgreSQLDialect
cloud:
gcp:
credentials:
location: file:/Users/beksultan/Documents/open-messanger/alien-scope-428812-i2-0794e36fcbee.json
servlet:
multipart:
max-file-size: 50MB
max-request-size: 50MB
aws:
access-key: ${AWS_ACCESS_KEY}
secret-key: ${AWS_SECRET_KEY}
region: us-east-2
attachments-bucket: ${AWS_ATTACHMENTS_BUCKET}
recordings-bucket: ${AWS_RECORDINGS_BUCKET}
transcripts-bucket: ${AWS_TRANSCRIPTS_BUCKET}
access-key:
secret-key:
region:
attachments-bucket:
recordings-bucket:
transcripts-bucket:
cognito:
user-pool-id: ${AWS_COGNITO_USER_POOL_ID}
app-client-id: ${AWS_COGNITO_APP_CLIENT_ID}
app-client-secret: ${AWS_COGNITO_APP_CLIENT_SECRET}
user-pool-id:
app-client-id:
app-client-secret:

jwks:
url: ${AWS_COGNITO_JWKS_URL}
url:

openai:
model: ${OPENAI_MODEL}
model: gpt-3.5-turbo-0301
api:
url: ${OPENAI_API_URL}
key: ${OPENAI_API_KEY}
url: https://api.openai.com/v1/chat/completions
key:

gemini:
api:
key: ${GEMINI_API_KEY}
url: ${GEMINI_API_URL}


system:
GOOGLE_APPLICATION_CREDENTIALS: ${GOOGLE_APPLICATION_CREDENTIALS}
key:
url: https://generativelanguage.googleapis.com/v1beta/models

kms:
url: ws://127.0.0.1:8888/kurento
Expand All @@ -64,4 +56,4 @@ state:

# FIREBASE
app:
firebase-configuration-file: ${FIREBASE_CONFIG_FILE}
firebase-configuration-json:

This file was deleted.

Loading