Skip to content

Commit

Permalink
Got docker compose security setup running locally. Also hoping to get…
Browse files Browse the repository at this point in the history
… them running again in the GHA workflow
  • Loading branch information
cpcundill committed Sep 6, 2024
1 parent a4dc0dd commit 303aa7d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/security-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:

- name: setup
run: |
npm install
make frontend-all
sudo curl -SL https://github.com/docker/compose/releases/download/v2.10.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker pull ${DOCKER_REPO}/${APPLICATION}:${DOCKER_APPLICATION_TAG}
Expand Down
2 changes: 1 addition & 1 deletion assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $govuk-new-link-styles: true;
$govuk-link-underline-offset: .2em;

// import all govuk frontend scss
@import "node_modules/govuk-frontend/govuk/all";
@import "govuk-frontend/govuk/all";

// planning.data.gov.uk specific styles
// --------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions default.paths.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"digitalLandFrontendPath": "node_modules/digital-land-frontend/",
"govukFrontendPath": "node_modules/govuk-frontend/",
"digitalLandFrontendPath": "node_modules/digital-land-frontend",
"govukFrontendPath": "node_modules/govuk-frontend/sass",
"scssPath": "./src/scss",
"templatesPath": "'application/templates'",
"staticFilesPath": "'application/static'",
Expand Down
9 changes: 8 additions & 1 deletion docker-compose.security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
build:
context: .
dockerfile: Dockerfile
target: dev
target: production
environment:
ENVIRONMENT: production
S3_HOISTED_BUCKET: https://digital-land-production-collection-dataset-hoisted.s3.eu-west-2.amazonaws.com
Expand All @@ -20,11 +20,18 @@ services:
PORT: 8000
WEB_CONCURRENCY: 1
DATA_FILE_URL: https://data.digital-land.info
RELOAD: "true"
PRE_START_PATH: "/src/prestart.sh"
volumes:
- .:/src
# - ./static:/src/static
# - .env.test.docker:/src/.env.test
healthcheck:
test: curl -v -i -f http://localhost:8000
interval: 1s
timeout: 3s
retries: 60
restart: on-failure

db:
image: postgis/postgis:13-master
Expand Down
2 changes: 1 addition & 1 deletion package-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if (fs.existsSync(optionalConfigPath)) {
}

scripts.build = {
stylesheets: `npx node-sass ${configPaths.scssPath} -o ${configPaths.stylesheetsOutputPath} --include-path ${configPaths.govukFrontendPath} --include-path ${configPaths.digitalLandFrontendPath}`,
stylesheets: `npx sass ${configPaths.scssPath}:${configPaths.stylesheetsOutputPath} --load-path=node_modules`,
}

scripts.copy = {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"copyfiles": "^2.4.1",
"govuk-frontend": "4.2.0",
"maplibre-gl": "^4.1.2",
"node-sass": "^9.0.0"
"sass": "^1.78.0"
},
"devDependencies": {
"@vitest/coverage-v8": "^0.34.1",
Expand Down

0 comments on commit 303aa7d

Please sign in to comment.