Skip to content

redhat-gamedev/shipwars-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

237 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shipwars Client

React application served using NGINX. Connects to the Shipwars WebSocket server.

Requirements

  • Node.js v14.3
  • Yarn v1.x
  • Source-to-Image v1.1.13 or newer

Notes on Serving

  • Game is served from the /shipwars path on NGINX.
  • The PUBLIC_URL=/shipwars variable is required by create-react-app to facilitate this.

Build, Run, and Push

Use the included script to invoke Source-to-Image:

# Optional environment variables that can be passed to the build
export QUAY_USER=yourusername
export IMAGE_TAG=latest
export IMAGE_REPOSITORY=quay.io/$QUAY_USER/shipwars-client

# Builds the image as quay.io/$QUAY_USER/shipwars-client:latest
./scripts/build.sh

Run the image using the following command. You can visit http://localhost:8484 to play the game, if you have the game server running on http://localhost:8181.

docker run --rm -p 8484:8484 quay.io/$QUAY_USER/shipwars-client:latest

Push to quay.io using this command:

docker push quay.io/$QUAY_USER/shipwars-client:latest

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 68.1%
  • SCSS 27.5%
  • HTML 3.2%
  • Other 1.2%