more refinements
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -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"]
|
||||
Reference in New Issue
Block a user