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

Changes to standup CTIMS for ACTIN #188

Draft
wants to merge 1 commit into
base: qa
Choose a base branch
from
Draft
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
2 changes: 0 additions & 2 deletions apps/api/prisma/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
DATABASE_URL=mysql://ctims:ctims@localhost:3306/ctims
PRISMA_FIELD_ENCRYPTION_KEY=k1.aesgcm256.RhSAzMU4Af5OKXUYQosqNLMRK1Nc3PicRp5iWa6I7Ko=
SHADOW_DATABASE_URL=mysql://shadow_db_url/ctims-shadow
1 change: 0 additions & 1 deletion apps/api/src/app/matchminer/matchminer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export class MatchminerService implements OnModuleInit, OnModuleDestroy {

onModuleInit(): any {
this.eventService = this.moduleRef.get(EventService, { strict: false });
this.initRabbitMQ();
}

onModuleDestroy(): any {
Expand Down
1 change: 0 additions & 1 deletion apps/api/src/app/message-queue/message-queue.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export class MessageQueueService implements OnModuleInit, OnModuleDestroy {

onModuleInit(): any {
this.eventService = this.moduleRef.get(EventService, { strict: false });
this.initRabbitMQ();
}

onModuleDestroy(): any {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const nextConfig = {
swcMinify: false,
publicRuntimeConfig: {
// Will be available on both server and client
REACT_APP_API_URL: process.env.REACT_APP_API_URL,
REACT_APP_API_URL: "http://localhost:3333",
NEXT_PUBLIC_SIGNOUT_REDIRECT_URL: process.env.NEXT_PUBLIC_SIGNOUT_REDIRECT_URL,
},
env: {
Expand Down
11 changes: 6 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
- /etc/localtime:/etc/localtime:ro
restart: on-failure
networks:
- my-network
- shared-network

backend:
container_name: ctims-api
Expand All @@ -43,7 +43,7 @@ services:
- "3333:3333"
restart: on-failure
networks:
- my-network
- shared-network

database:
container_name: ctims-db
Expand All @@ -54,7 +54,7 @@ services:
- "3306:3306"
restart: on-failure
networks:
- my-network
- shared-network

# https://github.com/prisma/prisma/releases/tag/2.17.0
database_shadow:
Expand All @@ -66,8 +66,9 @@ services:
- "3307:3306"
restart: on-failure
networks:
- my-network
- shared-network

networks:
my-network:
shared-network:
external: true

41 changes: 41 additions & 0 deletions keycloak/!
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
version: '3.9'

services:
mysql-kc:
image: mysql:8.0.27
ports:
- 3366:3306
restart: unless-stopped
environment:
MYSQL_USER: keycloak_user
MYSQL_PASSWORD: keycloak_password
MYSQL_DATABASE: keycloak_db
volumes:
- keycloak-and-mysql-volume:/var/lib/mysql
networks:
- host

keycloak-w:
image: quay.io/keycloak/keycloak:18.0
command: start-dev
ports:
- 8080:8080
restart: unless-stopped
environment:
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: admin
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
KC_HOSTNAME_STRICT_HTTPS: "false"
KC_HTTP_ENABLED: "true"
DB_VENDOR: mysql
DB_ADDR: mysql-kc
DB_PORT: 3306
DB_USER: keycloak_user
DB_PASSWORD: keycloak_password
DB_DATABASE: keycloak_db
depends_on:
- mysql-kc

volumes:
keycloak-and-mysql-volume:
15 changes: 13 additions & 2 deletions keycloak/keycloak-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,31 @@ services:
image: mysql:8.0.27
ports:
- 3366:3306
networks:
- shared-network
restart: unless-stopped
environment:
MYSQL_USER: keycloak_user
MYSQL_PASSWORD: keycloak_password
MYSQL_DATABASE: keycloak_db
MYSQL_ROOT_PASSWORD: root_password
volumes:
- keycloak-and-mysql-volume:/var/lib/mysql

keycloak-w:
image: quay.io/keycloak/keycloak:18.0
command: start
command: start-dev
ports:
- 8080:8080
networks:
- shared-network
restart: unless-stopped
environment:
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: admin
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
KC_HOSTNAME_STRICT_HTTPS: "false"
KC_HTTP_ENABLED: "true"
DB_VENDOR: mysql
DB_ADDR: mysql-kc
DB_PORT: 3306
Expand All @@ -34,3 +41,7 @@ services:

volumes:
keycloak-and-mysql-volume:

networks:
shared-network:
external: true
2 changes: 1 addition & 1 deletion keycloak/run-keycloak.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#! /bin/bash

docker compose -f keycloak-compose.yml up -d
docker-compose -f keycloak-compose.yml up -d