Skip to content

Commit 19f45dd

Browse files
committed
production deployment chanhes
1 parent d1b1f52 commit 19f45dd

File tree

14 files changed

+124
-64
lines changed

14 files changed

+124
-64
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,4 +183,8 @@ models.yaml
183183
*.pdfs.zip.part.2
184184
*.pdfs.zip.part.3
185185

186-
otel-collector-config.yaml
186+
otel-collector-config.yaml
187+
# Deployment files with sensitive data
188+
current-values.yaml
189+
apps/web/.env.production
190+

apps/web/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
server {
2-
listen 8000;
2+
listen 80;
33
location / {
44
root /usr/share/nginx/html;
55
index index.html;

apps/web/src/components/Upload/Upload.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export default function Upload({
111111
weight="bold"
112112
style={{ color: "#111" }}
113113
>
114-
Create Extracts
114+
Extract Document
115115
</Text>
116116
</Flex>
117117
{files.length > 0 && (

apps/web/src/components/Upload/UploadDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export default function UploadDialog({
8888
</defs>
8989
</svg>
9090
<Text size="3" weight="bold">
91-
Create Extract
91+
Extract Document
9292
</Text>
9393
</BetterButton>
9494
</Dialog.Trigger>

cloudflared-config.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,32 @@ credentials-file: /root/.cloudflared/YOUR_TUNNEL_ID.json
44
ingress:
55
# Main web application
66
- hostname: app.useorin.com
7-
service: http://localhost:5173
7+
service: http://127.0.0.1:80
88
originRequest:
99
noTLSVerify: true
10+
connectTimeout: 30s
1011

1112
# API server
1213
- hostname: api.app.useorin.com
13-
service: http://localhost:8000
14+
service: http://127.0.0.1:8000
1415
originRequest:
1516
noTLSVerify: true
17+
connectTimeout: 30s
1618

17-
# Authentication
19+
# Authentication - point directly to Keycloak HTTP (official approach)
1820
- hostname: auth.app.useorin.com
19-
service: http://localhost:8080
21+
service: http://127.0.0.1:8080
2022
originRequest:
2123
noTLSVerify: true
24+
connectTimeout: 30s
25+
httpHostHeader: auth.app.useorin.com
2226

2327
# S3/MinIO console (optional, for admin access)
2428
- hostname: s3.app.useorin.com
25-
service: http://localhost:9001
29+
service: http://127.0.0.1:9001
2630
originRequest:
2731
noTLSVerify: true
32+
connectTimeout: 30s
2833

2934
# Catch-all rule - return 404 for unmatched hostnames
3035
- service: http_status:404

compose-cpu.yaml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,22 @@ services:
5757

5858
# Web Frontend - Orin Build
5959
web:
60-
image: ghcr.io/buildorin/orin-web:latest
60+
build:
61+
context: .
62+
dockerfile: docker/web/Dockerfile
63+
args:
64+
VITE_KEYCLOAK_URL: https://auth.app.useorin.com
65+
VITE_KEYCLOAK_REALM: orin
66+
VITE_KEYCLOAK_CLIENT_ID: orin
67+
VITE_KEYCLOAK_REDIRECT_URI: https://app.useorin.com
68+
VITE_KEYCLOAK_POST_LOGOUT_REDIRECT_URI: https://app.useorin.com
69+
VITE_API_URL: https://api.app.useorin.com
6170
platform: linux/amd64
6271
ports:
63-
- "5173:8000"
72+
- "80:80"
6473
env_file:
65-
- .env
74+
- apps/web/.env
6675
restart: always
67-
environment:
68-
- VITE_API_URL=https://api.app.useorin.com
69-
- VITE_DOCS_URL=https://docs.useorin.com
70-
- VITE_KEYCLOAK_CLIENT_ID=orin
71-
- VITE_KEYCLOAK_POST_LOGOUT_REDIRECT_URI=https://app.useorin.com
72-
- VITE_KEYCLOAK_REALM=orin
73-
- VITE_KEYCLOAK_REDIRECT_URI=https://app.useorin.com
74-
- VITE_KEYCLOAK_URL=https://auth.app.useorin.com
7576

7677
# Segmentation Service - Orin Build
7778
segmentation-backend:
@@ -175,6 +176,8 @@ services:
175176
# Authentication
176177
keycloak:
177178
image: quay.io/keycloak/keycloak:25.0.2
179+
ports:
180+
- "8080:8080"
178181
environment:
179182
- KEYCLOAK_ADMIN=admin
180183
- KEYCLOAK_ADMIN_PASSWORD=admin
@@ -183,6 +186,9 @@ services:
183186
- KC_HOSTNAME_STRICT=false
184187
- KC_HOSTNAME_STRICT_HTTPS=false
185188
- KC_HTTP_ENABLED=true
189+
- KC_HTTPS_ENABLED=false
190+
- KC_HOSTNAME=auth.app.useorin.com
191+
- KC_HOSTNAME_PORT=443
186192
- KC_DB_URL=jdbc:postgresql://postgres:5432/keycloak
187193
- KC_DB_USERNAME=postgres
188194
- KC_DB_PASSWORD=postgres
@@ -195,12 +201,13 @@ services:
195201
test: [ "CMD", "curl", "-f", "http://localhost:8080/health" ]
196202
interval: 30s
197203
timeout: 10s
198-
retries: 10
199-
start_period: 600s
204+
retries: 3
205+
start_period: 40s
200206
depends_on:
201207
postgres:
202208
condition: service_healthy
203-
restart: always
209+
networks:
210+
- default
204211

205212
volumes:
206213
postgres_data:

docker/web/Dockerfile

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,33 @@ FROM node:18 as build
33

44
WORKDIR /app
55

6-
COPY apps/web/ .
6+
# Accept build arguments
7+
ARG VITE_KEYCLOAK_URL
8+
ARG VITE_KEYCLOAK_REALM
9+
ARG VITE_KEYCLOAK_CLIENT_ID
10+
ARG VITE_KEYCLOAK_REDIRECT_URI
11+
ARG VITE_KEYCLOAK_POST_LOGOUT_REDIRECT_URI
12+
ARG VITE_API_URL
13+
14+
# Set environment variables for build
15+
ENV VITE_KEYCLOAK_URL=$VITE_KEYCLOAK_URL
16+
ENV VITE_KEYCLOAK_REALM=$VITE_KEYCLOAK_REALM
17+
ENV VITE_KEYCLOAK_CLIENT_ID=$VITE_KEYCLOAK_CLIENT_ID
18+
ENV VITE_KEYCLOAK_REDIRECT_URI=$VITE_KEYCLOAK_REDIRECT_URI
19+
ENV VITE_KEYCLOAK_POST_LOGOUT_REDIRECT_URI=$VITE_KEYCLOAK_POST_LOGOUT_REDIRECT_URI
20+
ENV VITE_API_URL=$VITE_API_URL
21+
22+
# Debug: Print environment variables
23+
RUN echo "VITE_KEYCLOAK_URL: $VITE_KEYCLOAK_URL"
24+
RUN echo "VITE_KEYCLOAK_REALM: $VITE_KEYCLOAK_REALM"
25+
RUN echo "VITE_KEYCLOAK_CLIENT_ID: $VITE_KEYCLOAK_CLIENT_ID"
26+
RUN echo "VITE_KEYCLOAK_REDIRECT_URI: $VITE_KEYCLOAK_REDIRECT_URI"
27+
RUN echo "VITE_KEYCLOAK_POST_LOGOUT_REDIRECT_URI: $VITE_KEYCLOAK_POST_LOGOUT_REDIRECT_URI"
28+
RUN echo "VITE_API_URL: $VITE_API_URL"
29+
30+
# Copy only the web app files
31+
COPY apps/web/package.json apps/web/pnpm-lock.yaml ./
32+
COPY apps/web/ ./
733

834
# Install pnpm, turbo, and required type definitions
935
RUN npm install -g pnpm turbo

kube/charts/chunkr/infrastructure.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ services:
3838
- configMapRef:
3939
name: keycloak-config
4040
- secretRef:
41-
name: chunkr-secret
41+
name: orin-secret
4242
readinessProbe:
4343
httpGet:
4444
path: /realms/master
@@ -130,12 +130,12 @@ services:
130130
- name: MINIO_ROOT_USER
131131
valueFrom:
132132
secretKeyRef:
133-
name: chunkr-secret
133+
name: orin-secret
134134
key: AWS__ACCESS_KEY
135135
- name: MINIO_ROOT_PASSWORD
136136
valueFrom:
137137
secretKeyRef:
138-
name: chunkr-secret
138+
name: orin-secret
139139
key: AWS__SECRET_KEY
140140
args:
141141
- server
@@ -185,12 +185,12 @@ services:
185185
- name: MINIO_ROOT_USER
186186
valueFrom:
187187
secretKeyRef:
188-
name: chunkr-secret
188+
name: orin-secret
189189
key: AWS__ACCESS_KEY
190190
- name: MINIO_ROOT_PASSWORD
191191
valueFrom:
192192
secretKeyRef:
193-
name: chunkr-secret
193+
name: orin-secret
194194
key: AWS__SECRET_KEY
195195
volumes:
196196
- name: init-script

kube/charts/chunkr/templates/_deployment.tpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ spec:
5050
{{- if $service.imagePullSecrets }}
5151
imagePullSecrets:
5252
{{- toYaml $service.imagePullSecrets | nindent 8 }}
53+
{{- else if $.Values.global.image.pullSecrets }}
54+
imagePullSecrets:
55+
{{- toYaml $.Values.global.image.pullSecrets | nindent 8 }}
5356
{{- end }}
5457
containers:
5558
- name: {{ $name }}

kube/charts/chunkr/values.yaml

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ingress:
44
className: cloudflare
55
annotations:
66
kubernetes.io/ingress.class: nginx
7-
domain: chunkr.ai
7+
domain: app.useorin.com
88
subdomains:
99
root: true
1010
tls:
@@ -18,11 +18,10 @@ ingress:
1818
tag: 2024.12.1
1919
pullPolicy: Always
2020
config:
21-
tunnelName: chunkr
21+
tunnelName: app-tunnel
2222
services:
2323
- name: server
2424
- name: keycloak
25-
- name: web
2625
- name: minio
2726
common:
2827
standardEnv:
@@ -61,8 +60,10 @@ common:
6160
.Values.ingress.domain }}
6261
global:
6362
image:
64-
registry: luminainc
63+
registry: ghcr.io/buildorin
6564
pullPolicy: Always
65+
pullSecrets:
66+
- name: ghcr-secret
6667
storageClass: standard
6768
topologySpreadConstraints:
6869
- maxSkew: 1
@@ -112,16 +113,16 @@ services:
112113
enabled: true
113114
useStandardEnv: true
114115
image:
115-
repository: server
116-
tag: 1.20.1
116+
repository: orin-server
117+
tag: latest
117118
port: 8000
118119
targetPort: 8000
119120
ingress:
120121
enabled: true
121122
subdomain: api
122123
envFrom:
123124
- secretRef:
124-
name: chunkr-secret
125+
name: orin-secret
125126
volumes:
126127
- name: llm-models-config
127128
configMap:
@@ -135,11 +136,11 @@ services:
135136
enabled: true
136137
useStandardEnv: true
137138
image:
138-
repository: task
139-
tag: 1.20.1
139+
repository: orin-task
140+
tag: latest
140141
envFrom:
141142
- secretRef:
142-
name: chunkr-secret
143+
name: orin-secret
143144
env:
144145
- name: PG__POOL__MAX_SIZE
145146
value: '3'
@@ -155,20 +156,20 @@ services:
155156
web:
156157
enabled: true
157158
image:
158-
repository: web
159-
tag: 1.20.1
160-
port: 8000
161-
targetPort: 8000
159+
repository: orin-web
160+
tag: prod
161+
port: 80
162+
targetPort: 80
162163
ingress:
163164
enabled: true
164-
subdomain: www
165+
subdomain: ""
165166
env:
166167
- name: VITE_API_URL
167168
value: >-
168169
https://{{ .Values.services.server.ingress.subdomain }}.{{
169170
.Values.ingress.domain }}
170171
- name: VITE_DOCS_URL
171-
value: https://docs.chunkr.ai
172+
value: https://docs.useorin.com
172173
- name: VITE_KEYCLOAK_CLIENT_ID
173174
value: orin
174175
- name: VITE_KEYCLOAK_POST_LOGOUT_REDIRECT_URI
@@ -188,8 +189,8 @@ services:
188189
ocr:
189190
enabled: true
190191
image:
191-
repository: doctr
192-
tag: 1.20.1
192+
repository: orin-ocr
193+
tag: latest
193194
port: 8000
194195
targetPort: 8000
195196
useGPU: true
@@ -202,8 +203,8 @@ services:
202203
segmentation:
203204
enabled: true
204205
image:
205-
repository: segmentation
206-
tag: 1.5.0
206+
repository: orin-segmentation
207+
tag: latest
207208
port: 8000
208209
targetPort: 8000
209210
useGPU: true
@@ -219,3 +220,8 @@ services:
219220
value: '0.025'
220221
- name: SCORE_THRESHOLD
221222
value: '0.2'
223+
postgres:
224+
enabled: true
225+
credentials:
226+
username: postgres
227+
password: postgres

0 commit comments

Comments
 (0)