Compare commits

...

2 Commits

Author SHA1 Message Date
4c257cb1fb create kubernetes-job specific service with s3 uploads 2025-09-03 13:40:32 -04:00
d1d96fa8ad add s3cmd package to image 2025-09-03 13:01:53 -04:00
2 changed files with 19 additions and 1 deletions

View File

@@ -9,11 +9,13 @@ RUN npm ci
COPY tsconfig.json tsconfig.json
COPY rollup.config.ts rollup.config.ts
COPY entrypoint.sh entrypoint.sh
COPY entrypoint-job.sh entrypoint.sh
COPY src/ src/
RUN npm run build
RUN ls -l /app
RUN apk add s3cmd
ENTRYPOINT ["/bin/sh", "-c", "/app/entrypoint.sh"]

16
entrypoint-job.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/sh
set -e
echo "Running zap2xml"
node dist/index.js
echo "Checking if xmltv file exists"
if test -e "$OUTPUT_FILE"; then
echo "Attempting to upload to S3"
s3cmd put $OUTPUT_FILE "$S3_URL/$PUBLIC_FILENAME"
echo "Setting file to public"
s3cmd setacl "$S3_URL/$PUBLIC_FILENAME" --acl-public
else
echo "File not found, exiting"
exit 1
fi