more refinements

This commit is contained in:
Mats Tornberg
2025-11-22 15:57:36 +00:00
parent 00f236cac7
commit 790b174a9e
8 changed files with 270 additions and 22 deletions

View File

@@ -50,17 +50,7 @@ RUN cp -r dist /go/src/app/
# Set workdir back
WORKDIR /go/src/app
# Create startup script
RUN echo '#!/bin/bash\n\
/usr/local/sbin/telldusd --nodaemon &\n\
TELLDUSD_PID=$!\n\
./main &\n\
MAIN_PID=$!\n\
trap "kill $MAIN_PID $TELLDUSD_PID; exit" INT TERM\n\
wait $MAIN_PID\n\
kill $TELLDUSD_PID' > start.sh && chmod +x start.sh
EXPOSE 8080
# Run the application
CMD ["./start.sh"]
# Run the application (it will manage telldusd internally)
CMD ["./main"]