diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..a9c575d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +# Enforce Unix line endings for shell scripts and other Linux-executed files +*.sh text eol=lf +*.py text eol=lf +Dockerfile* text eol=lf +*.conf text eol=lf +*.sql text eol=lf +*.go text eol=lf +*.ts text eol=lf +*.tsx text eol=lf +*.json text eol=lf +*.yaml text eol=lf +*.yml text eol=lf +*.md text eol=lf +*.toml text eol=lf +*.env* text eol=lf + +# Binary files - no line ending conversion +*.png binary +*.jpg binary +*.ico binary +*.woff binary +*.woff2 binary +*.ttf binary diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 4488130..023141e 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -7,6 +7,7 @@ services: context: . dockerfile: infrastructure/docker/Dockerfile.api container_name: tod_api + restart: on-failure ports: - "8001:8000" env_file: .env @@ -66,6 +67,7 @@ services: context: ./poller dockerfile: ./Dockerfile container_name: tod_poller + restart: on-failure env_file: .env environment: ENVIRONMENT: dev diff --git a/infrastructure/openbao/init.sh b/infrastructure/openbao/init.sh index 9884e35..1400d18 100755 --- a/infrastructure/openbao/init.sh +++ b/infrastructure/openbao/init.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh # OpenBao Transit initialization script # Runs after OpenBao starts in dev mode diff --git a/poller/Dockerfile b/poller/Dockerfile index b55f94a..fa0a083 100644 --- a/poller/Dockerfile +++ b/poller/Dockerfile @@ -13,5 +13,9 @@ FROM alpine:3.21 RUN apk add --no-cache ca-certificates iproute2 COPY --from=builder /poller /usr/local/bin/poller COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh -RUN chmod +x /usr/local/bin/docker-entrypoint.sh +# Strip Windows CRLF line endings and make executable (safe even if already LF) +# Strip Windows CRLF and UTF-8 BOM if present (both break Linux shebang parsing) +RUN sed -i 's/\r//' /usr/local/bin/docker-entrypoint.sh && \ + sed -i '1s/^\xef\xbb\xbf//' /usr/local/bin/docker-entrypoint.sh && \ + chmod +x /usr/local/bin/docker-entrypoint.sh ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]