Skip to content

Commit 1c38f73

Browse files
committed
docker: run both epic-games and prime-gaming by default
1 parent 67e622e commit 1c38f73

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,7 @@ ENV SCREEN_WIDTH 1280
5656
ENV SCREEN_HEIGHT 1280
5757
ENV SCREEN_DEPTH 24
5858

59+
# Script to setup display server & VNC is always executed.
5960
ENTRYPOINT ["entrypoint"]
60-
CMD ["node", "epic-games.js"]
61+
# Default command to run. This is replaced by appending own command, e.g. `docker run ... node prime-gaming` to only run this script.
62+
CMD node epic-games; node prime-gaming

epic-games.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ const TIMEOUT = 20 * 1000; // 20s, default is 30s
1616
const SCREEN_WIDTH = Number(process.env.SCREEN_WIDTH) || 1280;
1717
const SCREEN_HEIGHT = Number(process.env.SCREEN_HEIGHT) || 1280;
1818

19+
console.log(datetime(), 'started checking epic-games');
20+
1921
const db = await jsonDb('epic-games.json');
2022
db.data ||= {};
2123
const migrateDb = (user) => {

prime-gaming.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ const headless = !debug && !show;
1010
const URL_CLAIM = 'https://gaming.amazon.com/home';
1111
const TIMEOUT = 20 * 1000; // 20s, default is 30s
1212

13+
console.log(datetime(), 'started checking prime-gaming');
14+
1315
const db = await jsonDb('prime-gaming.json');
1416
db.data ||= { claimed: [], runs: [] };
1517
const run = {

0 commit comments

Comments
 (0)