Skip to content

Tuki konttien ajamiseen kirjoitussuojatussa-tiedostojärjestessä#8585

Closed
ilja-git wants to merge 3 commits intomasterfrom
feat/read-only-nginx
Closed

Tuki konttien ajamiseen kirjoitussuojatussa-tiedostojärjestessä#8585
ilja-git wants to merge 3 commits intomasterfrom
feat/read-only-nginx

Conversation

@ilja-git
Copy link
Copy Markdown
Contributor

Mahdollista Nginxin ajaminen read-only-volumella siten, että vain /nginx-hakemistoon on kirjoitusoikeus.

@ilja-git ilja-git added the tech Tekninen muutos, esim. refaktorointi label Feb 24, 2026
@ilja-git ilja-git force-pushed the feat/read-only-nginx branch 6 times, most recently from 140ea08 to 6cc01bd Compare February 26, 2026 14:07
@ilja-git ilja-git changed the title Tuki Nginxin ajamiseen kirjoitussuojatussa-tiedostojärjestessä Tuki konttien ajamiseen kirjoitussuojatussa-tiedostojärjestessä Feb 26, 2026
@ilja-git ilja-git force-pushed the feat/read-only-nginx branch 4 times, most recently from 54d32c9 to 55a319e Compare March 3, 2026 10:28
Comment thread apigw/Dockerfile
RUN yarn workspaces focus --production \
&& yarn cache clean --all

USER evaka
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ajautuuko entrtpoint ja esim s3download tämän muutoksen jälkeen root-käyttäjänä?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ajautuu. Käyttäjä vaihdetaan evaka käyttäjään kun itse ohjelma ajetaan entrypointissa viimeisenä.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tästä aiheutuu varmaan sitten toisenlainen alertti AWS Security Hubissa. Uskoisin, että siellä tarkastellaan myös, että Dockerfile vaihtaa käyttäjän non-rootiksi

@ilja-git ilja-git marked this pull request as ready for review March 5, 2026 08:23
@ilja-git ilja-git force-pushed the feat/read-only-nginx branch from 55a319e to c06a34b Compare March 5, 2026 09:04
@@ -47,19 +47,25 @@ if [ "${DEPLOYMENT_BUCKET:-X}" != 'X' ]; then
s3download "$DEPLOYMENT_BUCKET" "proxy" /etc/nginx/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eikös tämä koita ladata tiedostoja RO mountatuun tiedostojärjestelmään?

@ilja-git ilja-git force-pushed the feat/read-only-nginx branch 4 times, most recently from 4c1c88d to c1283f2 Compare March 5, 2026 11:30
ilja-git and others added 2 commits March 5, 2026 14:21
Replace gosu-based privilege dropping with Dockerfile USER directive.
Fargate automatically creates ephemeral storage for VOLUME paths with
ownership inherited from the image, eliminating the need for ECS-level
volume definitions and root entrypoints.

- Remove gosu from service and apigw Dockerfiles
- Add chown + VOLUME + USER to all three Dockerfiles
- Fix proxy s3download to write to writable volume instead of /etc/nginx
- Remove unnecessary 'user nginx' directive from nginx.conf.template
- Add read_only + tmpfs to docker-compose.e2e.yml for local parity
@ilja-git ilja-git force-pushed the feat/read-only-nginx branch 2 times, most recently from 29f1564 to c4db881 Compare March 5, 2026 12:53
@ilja-git ilja-git closed this Mar 6, 2026
@ilja-git ilja-git deleted the feat/read-only-nginx branch March 31, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tech Tekninen muutos, esim. refaktorointi

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants