Skip to content

Commit

Permalink
Move gwells backend and frontend to root. Move Dockerfiles to to resp…
Browse files Browse the repository at this point in the history
…ective app folder.
  • Loading branch information
fergmac committed Aug 7, 2024
1 parent 8f1b060 commit 08dda63
Show file tree
Hide file tree
Showing 708 changed files with 16,093 additions and 42,410 deletions.
Binary file modified .DS_Store
Binary file not shown.
17 changes: 3 additions & 14 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: Bug
about: Create a report to help us improve
about: An undesirable behaviour that needs correction
title: ''
labels: bug
labels: ''
assignees: ''

---
Expand All @@ -14,22 +14,11 @@ A clear and concise description of what the bug is.
A clear and concise description of what you expected to happen.

**Actual Behaviour**
A clear and concise description of what you expected to happen.
A clear and concise description of what actually happens.

** Steps To Reproduce**
Steps to reproduce the behaviour:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
File renamed without changes.
7 changes: 5 additions & 2 deletions .github/ISSUE_TEMPLATE/task.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
---
name: Task
about: Work for the team that cannot be written as a user story
about: Any work that does not directly impact the user
title: ''
labels: task
labels: Task
assignees: ''

---

**Describe the task**
A clear and concise description of what the task is.

**Purpose**
The reason why this task is needed and/or what value it adds.

**Acceptance Criteria**
- [ ] first
- [ ] second
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/codeowners
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Matched against repo root (asterisk)
# * @mishraomp @DerekRoberts
* @bcgov/sustainment-team @DerekRoberts

# Matched against directories
# /.github/workflows/ @mishraomp @DerekRoberts
Expand Down
File renamed without changes.
File renamed without changes.
24 changes: 0 additions & 24 deletions backend/.dockerignore

This file was deleted.

File renamed without changes.
30 changes: 11 additions & 19 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
# Build
FROM node:22.5.1-slim AS build
FROM python:3.7-slim

Check failure

Code scanning / Trivy

Image user should not be 'root' High

Artifact: backend/Dockerfile
Type: dockerfile
Vulnerability DS002
Severity: HIGH
Message: Specify at least 1 USER command in Dockerfile with non-root user as argument
Link: DS002

Check notice

Code scanning / Trivy

No HEALTHCHECK defined Low

Artifact: backend/Dockerfile
Type: dockerfile
Vulnerability DS026
Severity: LOW
Message: Add HEALTHCHECK instruction in your Dockerfile
Link: DS026

# Copy, build static files; see .dockerignore for exclusions
WORKDIR /app
COPY . ./
ENV PRISMA_CLI_BINARY_TARGETS debian-openssl-3.0.x
RUN npm run deploy
RUN apt-get -y update

Check failure

Code scanning / Trivy

'RUN <package-manager> update' instruction alone High

Artifact: backend/Dockerfile
Type: dockerfile
Vulnerability DS017
Severity: HIGH
Message: The instruction 'RUN update' should always be followed by ' install' in the same RUN statement.
Link: DS017

RUN apt-get -y install git build-essential libgdal-dev

Check failure

Code scanning / Trivy

'apt-get' missing '--no-install-recommends' High

Artifact: backend/Dockerfile
Type: dockerfile
Vulnerability DS029
Severity: HIGH
Message: '--no-install-recommends' flag is missed: 'apt-get -y install git build-essential libgdal-dev'
Link: DS029

# Deploy using minimal Distroless image
FROM gcr.io/distroless/nodejs22-debian12:nonroot
ENV NODE_ENV production
ENV PATH="/usr/bin/python3:${PATH}"

# Copy app and dependencies
WORKDIR /app
COPY --from=build /app/node_modules ./node_modules
COPY --from=build /app/dist ./dist

# Boilerplate, not used in OpenShift/Kubernetes
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s CMD curl -f http://localhost:3000/api
RUN python3 -m pip install 'setuptools<58.0'
RUN python3 -m pip install --upgrade pip

COPY . /app

# Nonroot user, limit heap size to 50 MB
USER nonroot
CMD ["--max-old-space-size=50", "/app/dist/main"]
# RUN chmod +x load_fixtures.sh works when i pull the dockerfile into backend but not when dockerfile is with other docker files
RUN chmod +x /app
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 0 additions & 4 deletions backend/nest-cli.json

This file was deleted.

Loading

0 comments on commit 08dda63

Please sign in to comment.