-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into infra/docker_for_macos
- Loading branch information
Showing
534 changed files
with
19,426 additions
and
6,733 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,55 +30,34 @@ jobs: | |
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
- name: Run Trivy on OS | ||
uses: aquasecurity/trivy-action@master | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Get frontend version | ||
uses: avides/[email protected] | ||
id: frontend_version | ||
scan-type: "fs" | ||
ignore-unfixed: true | ||
format: "sarif" | ||
vuln-type: "os" | ||
output: "trivy-results-os.sarif" | ||
severity: "LOW,MEDIUM,HIGH,CRITICAL" | ||
|
||
- name: Upload Trivy OS scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
file-to-check: frontend/package.json | ||
only-return-version: true | ||
|
||
- name: use-version-from-check | ||
run: echo "The version we just got is ${{ steps.frontend_version.outputs.version }}" | ||
sarif_file: "trivy-results-os.sarif" | ||
category: "trivy-os" | ||
|
||
- name: Build image | ||
uses: docker/build-push-action@v4 | ||
env: | ||
GITHUB_SHA: ${{ github.sha }} | ||
VERSION: ${{ steps.frontend_version.outputs.version }} | ||
ENV_PROFILE: "prod" | ||
with: | ||
context: . | ||
builder: ${{ steps.buildx.outputs.name }} | ||
file: infra/docker/app/DockerfileCI | ||
push: true | ||
tags: | | ||
ghcr.io/mtes-mct/rapportnav2/rapportnav-app:${{ github.sha }} | ||
build-args: | | ||
VERSION=${{ env.VERSION }} | ||
ENV_PROFILE=${{ env.ENV_PROFILE }} | ||
GITHUB_SHA=${{ github.sha }} | ||
- name: Run Trivy on Docker build | ||
- name: Run Trivy on libraries | ||
uses: aquasecurity/trivy-action@master | ||
with: | ||
image-ref: "ghcr.io/mtes-mct/rapportnav2/rapportnav-app:${{ github.sha }}" | ||
format: sarif | ||
output: "trivy-results.sarif" | ||
severity: "CRITICAL,HIGH" | ||
|
||
- name: Upload Trivy scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v2 | ||
scan-type: "fs" | ||
ignore-unfixed: true | ||
format: "sarif" | ||
vuln-type: "library" | ||
output: "trivy-results-libs.sarif" | ||
severity: "HIGH,CRITICAL" | ||
|
||
- name: Upload Trivy Library scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: "trivy-results.sarif" | ||
sarif_file: "trivy-results-libs.sarif" | ||
category: "trivy-libs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
version: "3.7" | ||
|
||
services: | ||
app: | ||
image: "{{ docker_image_path }}" | ||
container_name: rapportnav_backend | ||
environment: | ||
- ENV_DB_URL=jdbc:postgresql://db:5432/{{ rapportnav_psql_db }}?user={{ rapportnav_psql_user }}&password={{ rapportnav_psql_pwd }} | ||
- SPRING_PROFILES_ACTIVE=prod | ||
ports: | ||
- 80:80 | ||
# volumes: | ||
# - "${RAPPORTNAV_LOGS_FOLDER}:/home/rapportnav/logs" | ||
depends_on: | ||
- db | ||
restart: always | ||
logging: | ||
driver: "json-file" | ||
options: | ||
max-size: "1024m" | ||
|
||
db: | ||
image: "{{ nexus_proxy }}/postgres:15.7-alpine" | ||
volumes: | ||
- db:/var/lib/postgresql/data | ||
restart: always | ||
ports: | ||
- "5432:5432" | ||
environment: | ||
POSTGRES_DB: {{ rapportnav_psql_db }} | ||
POSTGRES_USER: {{ rapportnav_psql_user }} | ||
POSTGRES_PASSWORD: {{ rapportnav_psql_pwd }} | ||
healthcheck: | ||
test: ["CMD-SHELL", "pg_isready -U postgres"] | ||
interval: 1s | ||
timeout: 1s | ||
retries: 30 | ||
|
||
volumes: | ||
db: | ||
name: rapportnavdb | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.