Bring repo up to REPO_POLICIES.md standards

- Add prettier (4-space indents) and reformat all files
- Add Makefile with test/lint/fmt/fmt-check/check/docker targets
- Add MIT LICENSE file
- Add REPO_POLICIES.md
- Fix Dockerfile: listen on 8080 with PORT env var via envsubst
- Restructure README.md with all required sections
- Set up pre-commit hook (make check)
- Update .prettierignore, .gitignore, .dockerignore
This commit is contained in:
2026-02-22 15:59:10 +01:00
parent ca403e68d1
commit 818accc454
14 changed files with 671 additions and 420 deletions

View File

@@ -10,10 +10,10 @@ RUN yarn build
FROM nginx@sha256:15e96e59aa3b0aada3a121296e3bce117721f42d88f5f64217ef4b18f458c6ab
# Remove default config
RUN rm /etc/nginx/conf.d/default.conf
# Custom nginx config: real_ip from RFC1918, access_log to stdout
COPY <<'EOF' /etc/nginx/conf.d/netwatch.conf
# Config template — envsubst replaces $PORT at container start
COPY <<'EOF' /etc/nginx/netwatch.conf.template
server {
listen 80;
listen $PORT;
server_name _;
root /usr/share/nginx/html;
@@ -44,4 +44,7 @@ EOF
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
ENV PORT=8080
EXPOSE 8080
CMD ["/bin/sh", "-c", "envsubst '$PORT' < /etc/nginx/netwatch.conf.template > /etc/nginx/conf.d/netwatch.conf && exec nginx -g 'daemon off;'"]