Skip to content

Commit 303aa7d

Browse files
committed
Got docker compose security setup running locally. Also hoping to get them running again in the GHA workflow
1 parent a4dc0dd commit 303aa7d

File tree

6 files changed

+15
-6
lines changed

6 files changed

+15
-6
lines changed

.github/workflows/security-scan.yml

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626

2727
- name: setup
2828
run: |
29+
npm install
30+
make frontend-all
2931
sudo curl -SL https://github.com/docker/compose/releases/download/v2.10.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
3032
sudo chmod +x /usr/local/bin/docker-compose
3133
docker pull ${DOCKER_REPO}/${APPLICATION}:${DOCKER_APPLICATION_TAG}

assets/stylesheets/application.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ $govuk-new-link-styles: true;
55
$govuk-link-underline-offset: .2em;
66

77
// import all govuk frontend scss
8-
@import "node_modules/govuk-frontend/govuk/all";
8+
@import "govuk-frontend/govuk/all";
99

1010
// planning.data.gov.uk specific styles
1111
// --------------------------------------------------------

default.paths.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"digitalLandFrontendPath": "node_modules/digital-land-frontend/",
3-
"govukFrontendPath": "node_modules/govuk-frontend/",
2+
"digitalLandFrontendPath": "node_modules/digital-land-frontend",
3+
"govukFrontendPath": "node_modules/govuk-frontend/sass",
44
"scssPath": "./src/scss",
55
"templatesPath": "'application/templates'",
66
"staticFilesPath": "'application/static'",

docker-compose.security.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
build:
1111
context: .
1212
dockerfile: Dockerfile
13-
target: dev
13+
target: production
1414
environment:
1515
ENVIRONMENT: production
1616
S3_HOISTED_BUCKET: https://digital-land-production-collection-dataset-hoisted.s3.eu-west-2.amazonaws.com
@@ -20,11 +20,18 @@ services:
2020
PORT: 8000
2121
WEB_CONCURRENCY: 1
2222
DATA_FILE_URL: https://data.digital-land.info
23+
RELOAD: "true"
24+
PRE_START_PATH: "/src/prestart.sh"
25+
volumes:
26+
- .:/src
27+
# - ./static:/src/static
28+
# - .env.test.docker:/src/.env.test
2329
healthcheck:
2430
test: curl -v -i -f http://localhost:8000
2531
interval: 1s
2632
timeout: 3s
2733
retries: 60
34+
restart: on-failure
2835

2936
db:
3037
image: postgis/postgis:13-master

package-scripts.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if (fs.existsSync(optionalConfigPath)) {
1616
}
1717

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

2222
scripts.copy = {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"copyfiles": "^2.4.1",
3939
"govuk-frontend": "4.2.0",
4040
"maplibre-gl": "^4.1.2",
41-
"node-sass": "^9.0.0"
41+
"sass": "^1.78.0"
4242
},
4343
"devDependencies": {
4444
"@vitest/coverage-v8": "^0.34.1",

0 commit comments

Comments
 (0)