These scripts assume a directory structure like this:
EAK - project root
├── E.A.K. - https://github.com/drumrollhq/E.A.K. - the main E.A.K. game
├── hindquarters - https://github.com/drumrollhq/eak-hindquarters - api server
├── scripts - This repo
└── web - https://github.com/drumrollhq/eak-web - E.A.K. website
You also need the following command line tools installed:
serve
-npm install --global serve
s3cmd
-brew install s3cmd
As the game is served from the same domain as the website, they are built and deployed as one. To build the game and website, run:
./prepare-web-deploy.sh
This script:
- Cleans up any old builds
- Creates a production build of the game
- Creates a production build of the website
- Merges the game and website builds in a
web-deploy
folder - Starts a server for the new build and opens your browser for you to check everything is working correctly
If you find errors in the build that don't make sense, you can try clearing the cache that the E.A.K. build tool uses to speed things up:
cd ../E.A.K.
gulp clean-all
cd -
To safely (ie without visitors encountering a half-uploaded game) upload the game to S3, use:
./web-upload.sh $UPLOAD_TARGET
where $UPLOAD_TARGET
is the url to an S3 bucket e.g. ./web-upload.sh s3://tipexsomefelines.net
.
Make sure you have s3cmd
configured with the correct access credentials for your s3 bucket.
$ node create-users.js
Usage: create-users --offset <n> --number <n>
Options:
-h, --help output usage information
-V, --version output the version number
-o, --offset <n> ID to start from
-n, --number <n> No of accounts to create
-p, --prefix <s> Username prefix
The tool will connect to http://localhost:3000 by default, you can overide this by setting the BASE_URL environment variable.
$ BASE_URL={URL} node create-users.js
The tool will create usernames like this: {prefix}+{offset}@drumrollhq.com, prefix is set to 'user' bt default and can be changed using the --prefix argument. The generated password will be Password123!