Skip to content

Commit 2d6fe9e

Browse files
Added frontend environment variables in docker-compose and helm (#6)
Added frontend environment variables in docker-compose and helm + cleanup
1 parent 8b9b1a0 commit 2d6fe9e

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

docker-compose.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ services:
5757
ports:
5858
- "8081:8081"
5959
environment:
60-
BACKEND_HOSTNAME: os2iot-backend
61-
BACKEND_PORT: 3000
60+
PRODUCTION: false
61+
BASE_URL: http://localhost:3000/api/v1/
62+
TABLE_PAGE_SIZE: 20
6263

6364
os2iot-backend:
6465
image: "os2iot-backend"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: {{ $.Chart.Name }}-configmap
5+
data:
6+
PRODUCTION: "true"
7+
BASE_URL: "http://localhost:3000/api/v1/"
8+
TABLE_PAGE_SIZE: "20"

helm/charts/os2iot-frontend/templates/deployment.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ spec:
3939
requests:
4040
cpu: 5m
4141
memory: 128Mi
42-
env:
43-
- name: DATABASE_HOSTNAME
44-
value: os2iot-postgres-svc
45-
- name: DATABASE_PORT
46-
value: '5432'
42+
envFrom:
43+
- configMapRef:
44+
name: {{ $.Chart.Name }}-configmap
4745
restartPolicy: Always

0 commit comments

Comments
 (0)