diff --git a/.dockerignore b/.dockerignore index b3dce7882d..6d40eb7d2b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,6 +5,9 @@ packages/**/node_modules packages/app/out packages/app/.next .github +.git +.vscode +docs # Allowlist !packages/app/*.conf diff --git a/Dockerfile b/Dockerfile index 90a3d44bd5..67f47f3410 100644 --- a/Dockerfile +++ b/Dockerfile @@ -76,7 +76,7 @@ RUN yarn download \ && yarn workspace @corona-dashboard/cli validate-last-values --fail-early \ && yarn workspace @corona-dashboard/cms lokalize:export --dataset=$NEXT_PUBLIC_SANITY_DATASET \ && yarn workspace @corona-dashboard/app build \ -&& mkdir /app/packages/app/public/images/choropleth \ +&& mkdir -p /app/packages/app/public/images/choropleth \ && addgroup -g 1001 -S nodejs \ && adduser -S nextjs -u 1001 \ && chown -R nextjs:nodejs /app/packages/app/.next \ diff --git a/docs/developers.md b/docs/developers.md index 26e6deda98..9a38c795d6 100644 --- a/docs/developers.md +++ b/docs/developers.md @@ -38,6 +38,25 @@ docker build \ . ``` +Running: + +```sh +docker run --init --publish 8080:8080 local-test +``` + +Debugging a running container: + +```sh +# get the containerId first by running +docker ps + +# then use the containerId to connect into it +docker exec -ti sh + +# you can now run certain commands to debug, to inspect file/dir sizes for example: +du -h -d 1 | sort -n +``` + ## Testing Windows screenreaders on Mac To properly test accessibility on Mac, screenreaders for Windows should be