Skip to content

Commit 0c3565a

Browse files
committed
chore: Dedicated Prod Deployment (#36)
* Build frontend components for prod * Copied prod portainer deployment
1 parent 38060f4 commit 0c3565a

File tree

10 files changed

+909
-34
lines changed

10 files changed

+909
-34
lines changed

.github/workflows/admin-client.yaml

+14-3
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,30 @@ jobs:
9494
username: ${{ secrets.DOCKERHUB_USERNAME }}
9595
password: ${{ secrets.DOCKERHUB_TOKEN }}
9696

97-
- name: Build & Push Docker Build
97+
- name: Build & Push Docker Build (dev)
9898
uses: docker/build-push-action@v4
9999
with:
100100
push: ${{ github.event_name != 'pull_request' }}
101101
context: ./packages/admin-client
102102
file: ./packages/admin-client/Dockerfile
103-
tags: ${{ steps.meta.outputs.tags }}
104-
labels: ${{ steps.meta.outputs.labels }}
103+
tags: hicsail/preaa-admin-client:main
105104
cache-from: type=gha,scope=gateway
106105
cache-to: type=gha,mode=max,scope=gateway
107106
build-args: |
108107
VITE_BACKEND_BASE_URL=${{ secrets.HELPER_BACKEND_URL }}
109108
109+
- name: Build & Push Docker Build (prod)
110+
uses: docker/build-push-action@v4
111+
with:
112+
push: ${{ github.event_name != 'pull_request' }}
113+
context: ./packages/admin-client
114+
file: ./packages/admin-client/Dockerfile
115+
tags: hicsail/preaa-admin-client:prod
116+
cache-from: type=gha,scope=gateway
117+
cache-to: type=gha,mode=max,scope=gateway
118+
build-args: |
119+
VITE_BACKEND_BASE_URL=${{ secrets.HELPER_BACKEND_URL_PROD }}
120+
110121
deployment:
111122
runs-on: ubuntu-latest
112123
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')

.github/workflows/chat-client.yaml

+16-16
Original file line numberDiff line numberDiff line change
@@ -75,38 +75,38 @@ jobs:
7575
- name: Checkout repository
7676
uses: actions/checkout@v3
7777

78-
- name: Docker Tags
79-
id: meta
80-
uses: docker/metadata-action@v4
81-
with:
82-
images: |
83-
hicsail/preaa-chat-client
84-
tags: |
85-
type=ref,event=branch
86-
type=semver,pattern={{version}}
87-
type=semver,pattern={{major}}
88-
type=semver,pattern={{major}}.{{minor}}
89-
9078
- name: Login to Docker Hub
9179
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
9280
uses: docker/login-action@v2
9381
with:
9482
username: ${{ secrets.DOCKERHUB_USERNAME }}
9583
password: ${{ secrets.DOCKERHUB_TOKEN }}
9684

97-
- name: Build & Push Docker Build
85+
- name: Build & Push Docker Build (dev)
9886
uses: docker/build-push-action@v4
9987
with:
10088
push: ${{ github.event_name != 'pull_request' }}
10189
context: ./packages/chat-client
10290
file: ./packages/chat-client/Dockerfile
103-
tags: ${{ steps.meta.outputs.tags }}
104-
labels: ${{ steps.meta.outputs.labels }}
91+
tags: hicsail/preaa-chat-client:main
10592
cache-from: type=gha,scope=gateway
10693
cache-to: type=gha,mode=max,scope=gateway
10794
build-args: |
10895
VITE_BACKEND_BASE_URL=${{ secrets.HELPER_BACKEND_URL }}
10996
97+
- name: Build & Push Docker Build (prod)
98+
uses: docker/build-push-action@v4
99+
with:
100+
push: ${{ github.event_name != 'pull_request' }}
101+
context: ./packages/chat-client
102+
file: ./packages/chat-client/Dockerfile
103+
tags: hicsail/preaa-chat-client:prod
104+
cache-from: type=gha,scope=gateway
105+
cache-to: type=gha,mode=max,scope=gateway
106+
build-args: |
107+
VITE_BACKEND_BASE_URL=${{ secrets.HELPER_BACKEND_URL_PROD }}
108+
109+
110110
deployment:
111111
runs-on: ubuntu-latest
112112
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
@@ -117,4 +117,4 @@ jobs:
117117
with:
118118
method: "POST"
119119
url: ${{ secrets.PORTAINER_WEBHOOK }}
120-
preventFailureOnNoResponse: true
120+
preventFailureOnNoResponse: true

.github/workflows/embedded-chat.yaml

+15-15
Original file line numberDiff line numberDiff line change
@@ -75,38 +75,38 @@ jobs:
7575
- name: Checkout repository
7676
uses: actions/checkout@v3
7777

78-
- name: Docker Tags
79-
id: meta
80-
uses: docker/metadata-action@v4
81-
with:
82-
images: |
83-
hicsail/preaa-embedded-chat
84-
tags: |
85-
type=ref,event=branch
86-
type=semver,pattern={{version}}
87-
type=semver,pattern={{major}}
88-
type=semver,pattern={{major}}.{{minor}}
89-
9078
- name: Login to Docker Hub
9179
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
9280
uses: docker/login-action@v2
9381
with:
9482
username: ${{ secrets.DOCKERHUB_USERNAME }}
9583
password: ${{ secrets.DOCKERHUB_TOKEN }}
9684

97-
- name: Build & Push Docker Build
85+
- name: Build & Push Docker Build (dev)
9886
uses: docker/build-push-action@v4
9987
with:
10088
push: ${{ github.event_name != 'pull_request' }}
10189
context: ./packages/embedded-chat
10290
file: ./packages/embedded-chat/Dockerfile
103-
tags: ${{ steps.meta.outputs.tags }}
104-
labels: ${{ steps.meta.outputs.labels }}
91+
tags: hicsail/preaa-embedded-chat:main
10592
cache-from: type=gha,scope=gateway
10693
cache-to: type=gha,mode=max,scope=gateway
10794
build-args: |
10895
VITE_BACKEND_BASE_URL=${{ secrets.HELPER_BACKEND_URL }}
10996
97+
- name: Build & Push Docker Build (prod)
98+
uses: docker/build-push-action@v4
99+
with:
100+
push: ${{ github.event_name != 'pull_request' }}
101+
context: ./packages/embedded-chat
102+
file: ./packages/embedded-chat/Dockerfile
103+
tags: hicsail/preaa-embedded-chat:prod
104+
cache-from: type=gha,scope=gateway
105+
cache-to: type=gha,mode=max,scope=gateway
106+
build-args: |
107+
VITE_BACKEND_BASE_URL=${{ secrets.HELPER_BACKEND_URL_PROD }}
108+
109+
110110
deployment:
111111
runs-on: ubuntu-latest
112112
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')

deploy/portainer-prod/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
stack.env
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# For more information, see the Configuration Guide:
2+
# https://www.librechat.ai/docs/configuration/librechat_yaml
3+
4+
# Configuration version (required)
5+
version: 1.2.1
6+
7+
# Cache settings: Set to true to enable caching
8+
cache: true
9+
10+
# Custom interface configuration
11+
interface:
12+
# Privacy policy settings
13+
privacyPolicy:
14+
externalUrl: 'https://librechat.ai/privacy-policy'
15+
openNewTab: true
16+
17+
# Terms of service
18+
termsOfService:
19+
externalUrl: 'https://librechat.ai/tos'
20+
openNewTab: true
21+
modalAcceptance: true
22+
modalTitle: "Terms of Service for LibreChat"
23+
modalContent: |
24+
# Terms and Conditions for LibreChat
25+
26+
*Effective Date: February 18, 2024*
27+
28+
Welcome to LibreChat, the informational website for the open-source AI chat platform, available at https://librechat.ai. These Terms of Service ("Terms") govern your use of our website and the services we offer. By accessing or using the Website, you agree to be bound by these Terms and our Privacy Policy, accessible at https://librechat.ai//privacy.
29+
30+
## 1. Ownership
31+
32+
Upon purchasing a package from LibreChat, you are granted the right to download and use the code for accessing an admin panel for LibreChat. While you own the downloaded code, you are expressly prohibited from reselling, redistributing, or otherwise transferring the code to third parties without explicit permission from LibreChat.
33+
34+
## 2. User Data
35+
36+
We collect personal data, such as your name, email address, and payment information, as described in our Privacy Policy. This information is collected to provide and improve our services, process transactions, and communicate with you.
37+
38+
## 3. Non-Personal Data Collection
39+
40+
The Website uses cookies to enhance user experience, analyze site usage, and facilitate certain functionalities. By using the Website, you consent to the use of cookies in accordance with our Privacy Policy.
41+
42+
## 4. Use of the Website
43+
44+
You agree to use the Website only for lawful purposes and in a manner that does not infringe the rights of, restrict, or inhibit anyone else's use and enjoyment of the Website. Prohibited behavior includes harassing or causing distress or inconvenience to any person, transmitting obscene or offensive content, or disrupting the normal flow of dialogue within the Website.
45+
46+
## 5. Governing Law
47+
48+
These Terms shall be governed by and construed in accordance with the laws of the United States, without giving effect to any principles of conflicts of law.
49+
50+
## 6. Changes to the Terms
51+
52+
We reserve the right to modify these Terms at any time. We will notify users of any changes by email. Your continued use of the Website after such changes have been notified will constitute your consent to such changes.
53+
54+
## 7. Contact Information
55+
56+
If you have any questions about these Terms, please contact us at [email protected].
57+
58+
By using the Website, you acknowledge that you have read these Terms of Service and agree to be bound by them.
59+
60+
endpointsMenu: true
61+
modelSelect: false
62+
parameters: true
63+
sidePanel: true
64+
presets: false
65+
prompts: true
66+
bookmarks: true
67+
multiConvo: true
68+
agents: true
69+
70+
# Example Registration Object Structure (optional)
71+
registration:
72+
socialLogins: ['github', 'google', 'discord', 'openid', 'facebook']
73+
74+
# Example Actions Object Structure
75+
actions:
76+
allowedDomains:
77+
- "swapi.dev"
78+
- "librechat.ai"
79+
- "google.com"
80+
81+
# Definition of custom endpoints
82+
endpoints:
83+
custom:
84+
- name: "LiteLLM"
85+
apiKey: "${LITELLM_API_KEY}"
86+
baseURL: "${LITELLM_URL}"
87+
# if using LiteLLM example in docker-compose.override.yml.example, use "http://litellm:8000/v1"
88+
models:
89+
default: ["llama3.1"]
90+
fetch: true
91+
titleConvo: true
92+
titleModel: "current_model"
93+
summaryModel: "current_model"
94+
summarize: false
95+
forcePrompt: false
96+
agents:
97+
recursionLimit: 50
98+
disableBuilder: false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
model_list:
2+
- model_name: "langflow-example"
3+
litellm_params:
4+
model: "langflow/my-model"
5+
6+
litellm_settings:
7+
custom_provider_map:
8+
- {"provider": "langflow", "custom_handler": langflow_handler.langflow}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
scrape_configs:
2+
- job_name: 'librechat_metrics'
3+
scrape_interval: 60s
4+
static_configs:
5+
- targets:
6+
- 'librechat-metrics:8000'
7+
- job_name: 'langflow_metrics'
8+
scrape_interval: 60s
9+
static_configs:
10+
- targets:
11+
- 'langflow:9090'

0 commit comments

Comments
 (0)