docker: run both epic-games and prime-gaming by default

This commit is contained in:
Ralf Vogler 2022-12-24 15:20:45 +01:00
parent 67e622e6ec
commit 1c38f730ab
3 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -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) => {

View file

@ -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 = {