Skip to content

Commit

Permalink
Without proxy container
Browse files Browse the repository at this point in the history
  • Loading branch information
gornication committed Jan 29, 2024
1 parent 85ee7d8 commit a32724d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 59 deletions.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,12 @@ COPY --chown=node:node --from=development /usr/src/app/client/node_modules ./cli

RUN apk add --no-cache --virtual .gyp python3 py3-pip make g++

# Install project dependencies before running build commands
RUN npm ci

RUN npm run build
RUN npm run build --prefix=client
# Build the client (React) project
RUN cd client && npm ci && npm run build

ENV NODE_ENV production

Expand Down
2 changes: 1 addition & 1 deletion charts/brokencrystals/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: |
Benchmark application that uses modern technologies and implements a set of
common security vulnerabilities
type: application
version: 0.0.50
version: 0.0.51
keywords:
- brokencrystals-exp
- brkn-e
59 changes: 5 additions & 54 deletions charts/brokencrystals/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ spec:
value: "https://raw.githubusercontent.com/NeuraLegion/brokencrystals/development/config/keys/jku.json"
- name: X5U_URL
value: "https://raw.githubusercontent.com/NeuraLegion/brokencrystals/development/config/keys/x509.crt"
volumeMounts:
- name: {{ include "brokencrystals.fullname" . }}-nginx-proxy
mountPath: /etc/nginx/conf.d/default.conf
subPath: default.conf
readOnly: true
resources:
requests:
cpu: 1800m
Expand All @@ -168,60 +173,6 @@ spec:
scheme: HTTP
initialDelaySeconds: 120
periodSeconds: 30

- name: proxy
image: brightsec/brokencrystals-proxy-http:{{ .Values.images.client }}
env:
- name: URL
value: "https://{{ .Values.ingress.url }}"
- name: DATABASE_HOST
value: "postgres"
- name: DATABASE_SCHEMA
value: "bc"
- name: DATABASE_USER
value: "bc"
- name: DATABASE_PASSWORD
value: "bc"
- name: DATABASE_PORT
value: "5432"
- name: DATABASE_DEBUG
value: "true"
- name: AWS_BUCKET
value: "https://neuralegion-open-bucket.s3.amazonaws.com"
- name: GOOGLE_MAPS_API
value: "AIzaSyD2wIxpYCuNI0Zjt8kChs2hLTS5abVQfRQ"
- name: JWT_PRIVATE_KEY_LOCATION
value: "config/keys/jwtRS256.key"
- name: JWT_PUBLIC_KEY_LOCATION
value: "config/keys/jwtRS256.key.pub.pem"
- name: JWT_SECRET_KEY
value: "1234"
- name: JWK_PRIVATE_KEY_LOCATION
value: "config/keys/jwk.key.pem"
- name: JWK_PUBLIC_KEY_LOCATION
value: "config/keys/jwk.pub.key.pem"
- name: JWK_PUBLIC_JSON
value: "config/keys/jwk.pub.json"
- name: JKU_URL
value: "https://raw.githubusercontent.com/NeuraLegion/brokencrystals/development/config/keys/jku.json"
- name: X5U_URL
value: "https://raw.githubusercontent.com/NeuraLegion/brokencrystals/development/config/keys/x509.crt"
volumeMounts:
- name: {{ include "brokencrystals.fullname" . }}-nginx-proxy
mountPath: /etc/nginx/conf.d/default.conf
subPath: default.conf
readOnly: true
resources:
requests:
cpu: 500m
memory: 50Mi
livenessProbe:
httpGet:
path: /
port: 80
scheme: HTTP
initialDelaySeconds: 120
periodSeconds: 30
restartPolicy: Always

volumes:
Expand Down
4 changes: 2 additions & 2 deletions charts/brokencrystals/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ spec:
app: {{ .Release.Name }}
ports:
- protocol: TCP
port: 80
targetPort: 80
port: 3000
targetPort: 3000

---
apiVersion: v1
Expand Down
2 changes: 1 addition & 1 deletion charts/brokencrystals/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ ingress:
cert: ""
authlevel: "."
images:
main: latest
main: experimental
client: latest

0 comments on commit a32724d

Please sign in to comment.