Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ORV2-1391-OC-PUPPETEER #654

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions backend/dops/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
node_modules
build
dist
**/.cache/
**/build/
**/dist/
**/node_modules/
**/test/
*.md
*.yml
*.yaml
14 changes: 13 additions & 1 deletion backend/dops/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ COPY . ./
# Create and Assign permissions to npm folder
RUN mkdir /.npm && chmod 777 /.npm

# Add user so we don't need --no-sandbox.
RUN addgroup -S pptruser && adduser -S -G pptruser pptruser \
# && mkdir -p /home/pptruser/Downloads /app \
&& chown -R pptruser:pptruser /home/pptruser \
&& chown -R pptruser:pptruser /app


# Run everything after as non-privileged user.
USER pptruser

# Install packages, build and keep only prod packages
RUN npm ci
RUN npm run build
Expand Down Expand Up @@ -67,13 +77,15 @@ COPY --from=builder /app/dist ./dist

RUN apk add --no-cache \
chromium \
curl \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont

ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser

# Expose Port
EXPOSE 5001
Expand Down
11 changes: 7 additions & 4 deletions backend/dops/openshift.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ parameters:
- name: DOMAIN
value: apps.silver.devops.gov.bc.ca
- name: CPU_REQUEST
value: "25m"
value: "250m"
- name: MEMORY_REQUEST
value: "50Mi"
value: "500Mi"
- name: CPU_LIMIT
value: "75m"
value: "500m"
- name: MEMORY_LIMIT
value: "150Mi"
value: "1Gi"
- name: MIN_REPLICAS
description: The minimum amount of replicas for the horizontal pod autoscaler.
value: "3"
Expand Down Expand Up @@ -207,6 +207,9 @@ objects:
spec:
containers:
- image: ${NAME}-${ZONE}-${COMPONENT}:${IMAGE_TAG}
securityContext:
capabilities:
add: ["NET_BIND_SERVICE"]
imagePullPolicy: Always
name: ${NAME}
env:
Expand Down
18 changes: 7 additions & 11 deletions charts/onroutebc/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,14 @@ apiVersion: v2
name: onRouteBC
description: Helm chart for onRouteBC
type: application
version: 0.0.1
version: 1.0.0
appVersion: "1.16.0"
dependencies: # A list of the chart requirements (optional)
- name: service
version: 0.0.1
repository: "file://../service"
- name: component
version: 1.0.0
repository: "file:///home/ubuntu/action-deployer-helm/charts/component"
alias: frontend
- name: service
version: 0.0.1
repository: "file://../service"
- name: component
version: 1.0.0
repository: "file:///home/ubuntu/action-deployer-helm/charts/component"
alias: vehicles
- name: service
version: 0.0.1
repository: "file://../service"
alias: dops
3 changes: 3 additions & 0 deletions frontend/openshift.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ objects:
spec:
containers:
- image: ${NAME}-${ZONE}-${COMPONENT}:${IMAGE_TAG}
securityContext:
capabilities:
add: ["NET_BIND_SERVICE"]
imagePullPolicy: Always
name: ${NAME}
ports:
Expand Down
Loading