Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

Commit

Permalink
Distinguish between web and worker processes
Browse files Browse the repository at this point in the history
  • Loading branch information
max committed Jun 9, 2020
1 parent 365ecca commit 46432ab
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scripts/heroku-deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ const VALID_SERVERS = [
'vulcan',
];

const serverType = s => (['api', 'hyperion'].includes(s) ? 'web' : 'worker');

let servers = args;

/*
Expand Down Expand Up @@ -60,16 +62,18 @@ console.log(
* Build and push Docker images for each server
*/
servers.forEach(s => {
const type = serverType(s);

exec(
`docker build -t spectrum_${s} -t registry.heroku.com/spectrum-chat-${s}/web -f docker/Dockerfile.${s} .`
`docker build -t spectrum_${s} -t registry.heroku.com/spectrum-chat-${s}/${type} -f docker/Dockerfile.${s} .`
);

exec(`docker push registry.heroku.com/spectrum-chat-${s}/web`);
exec(`docker push registry.heroku.com/spectrum-chat-${s}/${type}`);
});

/*
* Release new images for each server
*/
servers.forEach(s => {
exec(`heroku container:release web -a spectrum-chat-${s}`);
exec(`heroku container:release ${serverType(s)} -a spectrum-chat-${s}`);
});

0 comments on commit 46432ab

Please sign in to comment.