-
Notifications
You must be signed in to change notification settings - Fork 94
Deploying web version
We are not deploying the web version is CICD for now, so the deployment should be done manually.
The official jar, that can be downloaded from the WCA website, is used as backend. We also deploy the frontend separately so we can change URLs without affecting the official jar (which run usually on localhost:2014
).
- Build a docker TNoodle docker version.
You can build the docker version directly or by using the official jar version and the Dockerfile
FROM adoptopenjdk/openjdk11:latest
COPY TNoodle-WCA-1.2.2.jar app.jar
ENTRYPOINT [ "java", "-jar", "/app.jar", "--nobrowser", "--noiconbar" ]
Remember to replace the version correctly. Also, you should be in the same folder as the downloaded TNoodle version.
-
Push the image to ECR. You can get instructions from the TNoodle ECR.
-
Restart the TNoodle ECS task.
Deploy the frontend separately. The jar is used only as backend. We deploy a new frontend in which we fully control the URLs. Changing the official jar is more difficult because you would need to sign it. This is an easier version.
-
Replace URLs. You should navigate to the
client
folder and-
Change
homepage
tohttps://tnoodle.worldcubeassociation.org
in the fileclient/package.json
-
Change
backendUrl
tonew URL("https://tnoodle.worldcubeassociation.org")
in the fileclient/src/main/api/tnoodle.api.ts
-
cd client
nvm use 14 # or `nvm install 14`
yarn install
yarn build
-
Get the variables value from the actions configurations in this repo. You will need
CF_DISTRIBUTION_ID
andDEPLOYMENT_BUCKET
. Export them with the same name in your local terminal. -
In the
client
folder, after running thebuild
command (it created thebuild
folder), run
aws configure set preview.cloudfront true
aws s3 sync build s3://$DEPLOYMENT_BUCKET --delete
aws cloudfront create-invalidation --distribution-id $CF_DISTRIBUTION_ID --paths /\*