File tree 7 files changed +30
-22
lines changed
7 files changed +30
-22
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,25 @@ Este archivo docker-compose.yml te permitirá levantar tanto el backend con Fast
115
115
116
116
kubectl create secret generic llm-service-token-secret --from-literal=SERVICE_TOKEN=myllservicetoken2024
117
117
118
+ # Desplegar el backend
119
+ kubectl apply -f backend/k8s/deployment.yaml
120
+ kubectl apply -f backend/k8s/service.yaml
121
+
122
+ # Desplegar el frontend
123
+ kubectl apply -f frontend/k8s/deployment.yaml
124
+ kubectl apply -f frontend/k8s/service.yaml
125
+
126
+ kubectl get services
127
+
128
+
129
+ kubectl delete service chatllm-backendapi-service
130
+ kubectl delete service chatllm-frontend-service
131
+
132
+ kubectl get deployments
133
+
134
+ kubectl delete deployment chatllm-backendapi-deployment
135
+ kubectl delete deployment chatllm-frontend-deployment
136
+
118
137
export SERVICE_TOKEN=myllservicetoken2024
119
138
120
139
docker-compose up
Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ COPY ./api /api
14
14
# Copy .env file into the container at /api
15
15
COPY .env /api
16
16
17
+ # Export .env variables
18
+ ENV $(cat .env | xargs)
19
+
17
20
# Expose the port the api runs in
18
21
EXPOSE 8000
19
22
Original file line number Diff line number Diff line change 1
1
apiVersion : v1
2
2
kind : Service
3
3
metadata :
4
- name : chatllm-backendapi-- service
4
+ name : chatllm-backendapi-service
5
5
spec :
6
6
selector :
7
7
app : chatllmapi
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ services:
8
8
environment :
9
9
- MODULE_NAME=api.main
10
10
- VARIABLE_NAME=api
11
- - SERVICE_TOKEN=${SERVICE_TOKEN}
11
+
12
12
13
13
frontend :
14
14
image : ghcr.io/adribaeza/llm-tinyllama-frontend:latest
@@ -18,8 +18,4 @@ services:
18
18
- " 8501:8501"
19
19
depends_on :
20
20
- backend
21
- environment :
22
- - SERVICE_TOKEN=${SERVICE_TOKEN}
23
-
24
- env_file :
25
- - .env
21
+
Original file line number Diff line number Diff line change @@ -9,9 +9,7 @@ services:
9
9
environment :
10
10
- MODULE_NAME=api.main
11
11
- VARIABLE_NAME=api
12
- - SERVICE_TOKEN=${SERVICE_TOKEN}
13
- env_file :
14
- - ./frontend/.env
12
+
15
13
16
14
frontend :
17
15
build :
@@ -21,8 +19,4 @@ services:
21
19
ports :
22
20
- " 8501:8501"
23
21
depends_on :
24
- - backend
25
- environment :
26
- - SERVICE_TOKEN=${SERVICE_TOKEN}
27
- env_file :
28
- - ./backend/.env
22
+ - backend
Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ RUN pip install --no-cache-dir -r requirements.txt
14
14
# Copy .env file into the container at /api
15
15
COPY .env /api
16
16
17
+ # Export .env variables
18
+ ENV $(cat .env | xargs)
19
+
17
20
# Make port 8501 available to the world outside this container
18
21
EXPOSE 8501
19
22
Original file line number Diff line number Diff line change @@ -85,10 +85,3 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
85
85
86
86
87
87
88
- # Desplegar el backend
89
- kubectl apply -f backend/k8s/backend-deployment.yaml
90
- kubectl apply -f backend/k8s/backend-service.yaml
91
-
92
- # Desplegar el frontend
93
- kubectl apply -f frontend/k8s/frontend-deployment.yaml
94
- kubectl apply -f frontend/k8s/frontend-service.yaml
You can’t perform that action at this time.
0 commit comments