Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 1.02 KB

README.md

File metadata and controls

41 lines (28 loc) · 1.02 KB

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