Skip to content

Commit e932086

Browse files
authored
Add Ferret for a Open source (non-mongo) deployment option (#229)
* docker-compose to docker compose * initial partially-working ferret version * whatever I had on this branch * working barebones ferret camicroscope * revert special dev tag * key: add keycloak second
1 parent cf2a5ff commit e932086

File tree

6 files changed

+123
-3
lines changed

6 files changed

+123
-3
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ jobs:
66
steps:
77
- uses: actions/checkout@v2
88
- name: Build the develop stack
9-
run: docker-compose -f develop.yml build
9+
run: docker compose -f develop.yml build

config/keycloak_login.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<html>
22
<title>caMicroscope Keycloak Login</title>
33
<head>
4-
<meta name="client_secret" content="MS3NXMPABktO2Dom7qoT0BStlYk1Z1jc">
4+
<meta name="client_secret" content="uHbasU3TFAJJrEcQdxApm4ZhrKQL6La7">
55
<meta name="client_id" content="camicroscope-test">
66
<link rel="stylesheet" href="./apps/landing/main.css" />
77
<meta name="viewport" content="width=device-width, initial-scale=1" />

config/postgres_db_user_setup.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CREATE USER keycloak WITH PASSWORD 'password';
2+
CREATE DATABASE keycloak;
3+
GRANT ALL PRIVILEGES ON DATABASE keycloak TO keycloak;
4+
GRANT ALL PRIVILEGES ON SCHEMA public TO keycloak;
5+
ALTER USER keycloak WITH SUPERUSER;

develop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ services:
2424
- ./jwt_keys/:/src/keys/
2525
- ./config/routes.json:/src/routes.json
2626
- ./config/contentSecurityPolicy.json:/src/contentSecurityPolicy.json
27+
- ../camicroscope/:/src/camicroscope/
2728
environment:
2829
JWK_URL: "https://www.googleapis.com/oauth2/v3/certs"
2930
IIP_PATH: "http://ca-iip:8080/fcgi-bin/iipsrv.fcgi"

kc_caMicroscope.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,5 @@ services:
114114
environment:
115115
DICOM_PORT: "11112"
116116
DICOM_UI_PORT: "8042"
117-
CARACAL_BACK_HOST_PORT: "ca-back:4010"
117+
CARACAL_BACK_HOST_PORT: "ca-back:4010"
118+

osi_camicroscope.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
version: '3'
2+
3+
volumes:
4+
postgres_data:
5+
name: postgres_data
6+
ferret_data:
7+
name: ferret_data
8+
9+
networks:
10+
default:
11+
name: ferretdb
12+
13+
services:
14+
postgres:
15+
image: ghcr.io/ferretdb/postgres-documentdb:17-0.104.0-ferretdb-2.3.1
16+
container_name: ca-key-db
17+
volumes:
18+
- postgres_data:/var/lib/postgresql/data
19+
- ./config/postgres_db_user_setup.sql:/docker-entrypoint-initdb.d/init.sql
20+
environment:
21+
POSTGRES_DB: postgres
22+
POSTGRES_USER: ferret
23+
POSTGRES_PASSWORD: ferretpassword
24+
restart: always
25+
logging:
26+
options:
27+
max-file: "5"
28+
max-size: "10m"
29+
keycloak:
30+
container_name: ca-key
31+
image: quay.io/keycloak/keycloak:latest
32+
command: start-dev
33+
environment:
34+
KC_DB: postgres
35+
KC_DB_URL: jdbc:postgresql://ca-key-db:5432/keycloak
36+
KC_DB_USERNAME: keycloak
37+
KC_DB_PASSWORD: password
38+
KEYCLOAK_ADMIN: admin
39+
KEYCLOAK_ADMIN_PASSWORD: password
40+
ports:
41+
- 8080:8080
42+
restart: always
43+
logging:
44+
options:
45+
max-file: "5"
46+
max-size: "10m"
47+
depends_on:
48+
- postgres
49+
ferretdb:
50+
image: ghcr.io/ferretdb/ferretdb:2.3.1
51+
container_name: ca-ferretdb
52+
restart: always
53+
logging:
54+
options:
55+
max-file: "5"
56+
max-size: "10m"
57+
environment:
58+
- FERRETDB_POSTGRESQL_URL=postgresql://ferret:ferretpassword@ca-key-db:5432/postgres
59+
- FERRETDB_AUTH=0
60+
volumes:
61+
- ferret_data:/data/db
62+
depends_on:
63+
- postgres
64+
back:
65+
build:
66+
context: "https://github.com/camicroscope/caracal.git#v3.12.0"
67+
args:
68+
viewer: "v3.12.1"
69+
depends_on:
70+
- "ferretdb"
71+
ports:
72+
- "4010:4010"
73+
container_name: ca-back
74+
restart: always
75+
logging:
76+
options:
77+
max-file: "5"
78+
max-size: "10m"
79+
volumes:
80+
- ./images/:/images/
81+
- ./config/login.html:/src/static/login.html
82+
- ./jwt_keys/:/src/keys/
83+
- ./config/routes.json:/src/routes.json
84+
- ./config/contentSecurityPolicy.json:/src/contentSecurityPolicy.json
85+
environment:
86+
DISABLE_SEC: "true"
87+
JWK_URL: "http://ca-back:4010/keycloak/realms/camic/protocol/openid-connect/certs"
88+
IIP_PATH: "http://ca-iip:8080/fcgi-bin/iipsrv.fcgi"
89+
MONGO_URI: "mongodb://ca-ferretdb"
90+
GENERATE_KEY_IF_MISSING: "true"
91+
iip:
92+
image: camicroscope/iipimage:version-3.11.0
93+
container_name: ca-iip
94+
logging:
95+
options:
96+
max-file: "5"
97+
max-size: "10m"
98+
restart: always
99+
volumes:
100+
- ./images/:/images/
101+
loader:
102+
build: "https://github.com/camicroscope/SlideLoader.git#v3.12.0"
103+
container_name: ca-load
104+
restart: always
105+
logging:
106+
options:
107+
max-file: "5"
108+
max-size: "10m"
109+
volumes:
110+
- ./images/:/images/
111+
environment:
112+
DICOM_PORT: "11112"
113+
DICOM_UI_PORT: "8042"

0 commit comments

Comments
 (0)