Merge pull request #5 from lover-of-memes/dockerfile

dockerfile & bunzip2 check fix
pull/4/head
Florian Brede 2021-09-13 02:04:11 +02:00 committed by GitHub
commit 5005a444d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 2 deletions

22
Dockerfile 100644
View File

@ -0,0 +1,22 @@
FROM alpine:latest
CMD ["crond", "-f"]
RUN echo -e "* * * * * cd /retropilot-server/; node -r esm worker.js\n* * * * * cd /retropilot-server; node -r esm server.js" > /etc/crontabs/root
# Create the log file to be able to run tail
RUN touch /var/log/cron.log
# Install dependencies
RUN apk add --no-cache git nodejs npm
# TODO maybe install nodejs-npm?
# Install Retropilot
RUN git clone "https://github.com/florianbrede-ayet/retropilot-server.git"; cd retropilot-server; npm install
# Install node packages, even though we should have it through retropilot...
RUN npm install -g esm
# Remove build dependencies
RUN apk del git

View File

@ -766,7 +766,7 @@ async function mainWorkerLoop() {
// make sure bunzip2 is available
try {
execSync(`bunzip2 --version`);
execSync(`bunzip2 --help`);
}
catch (exception) {
logger.error("bunzip2 is not installed or not available in environment path")
@ -800,4 +800,4 @@ lockfile.lock('retropilot_worker.lock', { realpath: false, stale: 90000, update:
}).catch((e) => {
console.error(e)
process.exit();
});
});