This repository has been archived by the owner on Dec 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
294b466
commit 7dee61a
Showing
37 changed files
with
3,125 additions
and
3,581 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Sandbox | ||
|
||
## Quickstart Tutorial | ||
|
||
View the documentation [here](https://rivet.gg/docs/html5/tutorials/quickstart). | ||
|
||
## Prerequisites | ||
|
||
- Rivet CLI | ||
- NodeJS | ||
- Open ports: 8080 (client), 7777 (game server), 6420 (Rivet) | ||
|
||
## Instructions | ||
|
||
### Develop | ||
|
||
``` | ||
npm install | ||
npm run dev | ||
``` | ||
|
||
Open [http://127.0.0.1:8080](http://127.0.0.1:8080). | ||
|
||
### Deploy | ||
|
||
``` | ||
rivet login | ||
rivet deploy prod | ||
``` | ||
|
||
#### Connecting | ||
|
||
In the client served by `npm run dev`: | ||
|
||
1. Run `rivet backend get-endpoint prod` and copy this value to the _Endpoint_ field. | ||
2. Run `rivet backend get-current-version prod` and copy this value to the _Game Version_ field. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM node:20-alpine | ||
RUN adduser -D server | ||
WORKDIR /app | ||
|
||
COPY package.json package.json | ||
COPY packages/rivet-sdk ./packages/rivet-sdk | ||
COPY packages/game-server ./packages/game-server | ||
WORKDIR /app/packages/game-server | ||
RUN npm install --frozen-lockfile && npm run build | ||
|
||
RUN chown -R server:server /app | ||
USER server | ||
EXPOSE 7777 | ||
|
||
CMD ["node", "dist/index.js"] |
Oops, something went wrong.