diff --git a/Dockerfile b/Dockerfile index e5937b3..ceeabf5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,5 +56,7 @@ ENV SCREEN_WIDTH 1280 ENV SCREEN_HEIGHT 1280 ENV SCREEN_DEPTH 24 +# Script to setup display server & VNC is always executed. ENTRYPOINT ["entrypoint"] -CMD ["node", "epic-games.js"] +# Default command to run. This is replaced by appending own command, e.g. `docker run ... node prime-gaming` to only run this script. +CMD node epic-games; node prime-gaming diff --git a/epic-games.js b/epic-games.js index 9fd3097..6c526b8 100644 --- a/epic-games.js +++ b/epic-games.js @@ -16,6 +16,8 @@ const TIMEOUT = 20 * 1000; // 20s, default is 30s const SCREEN_WIDTH = Number(process.env.SCREEN_WIDTH) || 1280; const SCREEN_HEIGHT = Number(process.env.SCREEN_HEIGHT) || 1280; +console.log(datetime(), 'started checking epic-games'); + const db = await jsonDb('epic-games.json'); db.data ||= {}; const migrateDb = (user) => { diff --git a/prime-gaming.js b/prime-gaming.js index 09f036f..cb7a0cc 100644 --- a/prime-gaming.js +++ b/prime-gaming.js @@ -10,6 +10,8 @@ const headless = !debug && !show; const URL_CLAIM = 'https://gaming.amazon.com/home'; const TIMEOUT = 20 * 1000; // 20s, default is 30s +console.log(datetime(), 'started checking prime-gaming'); + const db = await jsonDb('prime-gaming.json'); db.data ||= { claimed: [], runs: [] }; const run = {