diff --git a/.env.dev.docker b/.env.dev.docker index 3c0e26c7..c3bf66b7 100644 --- a/.env.dev.docker +++ b/.env.dev.docker @@ -1,6 +1,6 @@ ENVIRONMENT="development" DATABASE_URL="postgres://postgres:postgres@db/digital_land" -PRE_START_PATH=/src/prestart-dev.sh +PRE_START_PATH=/src/prestart.sh PORT=8000 RELOAD="true" WEB_CONCURRENCY=1 diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml index 5bb5d6c3..8254d25e 100644 --- a/.github/workflows/security-scan.yml +++ b/.github/workflows/security-scan.yml @@ -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} diff --git a/assets/stylesheets/application.scss b/assets/stylesheets/application.scss index fdb81846..d9ebac1f 100644 --- a/assets/stylesheets/application.scss +++ b/assets/stylesheets/application.scss @@ -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 // -------------------------------------------------------- diff --git a/default.paths.json b/default.paths.json index d2cdf104..896ae75f 100644 --- a/default.paths.json +++ b/default.paths.json @@ -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'", diff --git a/docker-compose.security.yml b/docker-compose.security.yml index 8c220dab..57405dce 100644 --- a/docker-compose.security.yml +++ b/docker-compose.security.yml @@ -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 @@ -20,11 +20,16 @@ services: PORT: 8000 WEB_CONCURRENCY: 1 DATA_FILE_URL: https://data.digital-land.info + RELOAD: "true" + PRE_START_PATH: "/src/prestart.sh" + volumes: + - .:/src healthcheck: test: curl -v -i -f http://localhost:8000 interval: 1s timeout: 3s retries: 60 + restart: on-failure db: image: postgis/postgis:13-master diff --git a/docker-compose.yml b/docker-compose.yml index a8cb5b58..af325d5d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,13 +8,16 @@ services: target: dev volumes: - .:/src - - .env.test.docker:/src/.env.test + # - .env.test.docker:/src/.env.test ports: - "8000:8000" depends_on: db: condition: service_healthy env_file: ./.env.dev.docker + environment: + DATASETTE_URL: https://datasette.digital-land.info + DATA_FILE_URL: https://data.digital-land.info healthcheck: test: curl -v -i -f http://localhost:8000 interval: 1s diff --git a/package-scripts.js b/package-scripts.js index f9d0ed74..e31eaba5 100644 --- a/package-scripts.js +++ b/package-scripts.js @@ -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 = { diff --git a/package.json b/package.json index 21970ff2..b6d9b801 100644 --- a/package.json +++ b/package.json @@ -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",