Skip to content

Commit

Permalink
Merge pull request #8 from hackoregon/separate-get-and-start-scripts
Browse files Browse the repository at this point in the history
Separate the 'get' and 'start' scripts
  • Loading branch information
DingoEatingFuzz authored Nov 14, 2019
2 parents d45b62c + 9076c26 commit e35abcf
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,25 @@ $ bash get-game.sh

To make it as easy as possible to get and start the docker images, the `get-game.ps1` powershell script is available on S3. Running the latest build of the game and web server takes three steps:

1. Download the script
1. Download the scripts

```powershell
PS:\> curl -Uri https://hacko-cdn.s3-us-west-2.amazonaws.com/earthquake-heroes/get-game.ps1 -OutFile get-game.ps1
PS:\> curl -Uri https://hacko-cdn.s3-us-west-2.amazonaws.com/earthquake-heroes/start-game.ps1 -OutFile start-game.ps1
```

2. Edit the script to provide values for the AWS environment variables. If you are meant to run the game, you'll have credentials.

3. Run the script
3. Run the get-game script to pull docker containers

```powershell
PS:\> & .\get-game.ps1
```

4. Run the start-game script to run the tileserver and the game!

```powershell
PS:\> & .\start-game.ps1
```

**:warning: Note! These scripts require Docker, Git and the AWS CLI to be installed already.**
3 changes: 1 addition & 2 deletions get-game.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ Set-Location -Path earthquake-heroes
# Authenticate with ECR
Invoke-Expression -Command (aws ecr get-login --no-include-email --region us-west-2)

# Start the tile server and the game!
# Get the docker images
docker-compose pull
docker-compose up
14 changes: 14 additions & 0 deletions start-game.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# AWS credentials SECRET DO NOT SHARE
Set-Item -Path Env:AWS_ACCESS_KEY_ID -Value
Set-Item -Path Env:AWS_SECRET_ACCESS_KEY -Value
Set-Item -Path Env:AWS_REGISTRY -Value

# Clone the project that contains the docker-compose file
git clone https://github.com/hackoregon/earthquake-heroes-offline.git earthquake-heroes
Set-Location -Path earthquake-heroes

# Authenticate with ECR
Invoke-Expression -Command (aws ecr get-login --no-include-email --region us-west-2)

# Start the tile server and the game!
docker-compose up

0 comments on commit e35abcf

Please sign in to comment.