Updated instructions.

pull/61/head
frutescens 2 weeks ago
parent 654a70c867
commit 923e63e98a

@ -11,41 +11,55 @@ There is a sample docker-compose file for setting up a docker container to setup
- npm: [how to install](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) - npm: [how to install](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
## Installation: ## Installation:
The docker compose file should automatically implement a container with mariadb with an empty database and the default user and password combo of pokerogue:pokerogue ### First Steps
- Edit beta.env
### src/utils.ts:224-225 (in pokerogue) - Setting VITE_BYPASS_LOGIN to 0 helps provide access to PokeRogue's accounts features
Replace both URLs (one on each line) with the local API server address from rogueserver.go (0.0.0.0:8001) (or whatever port you picked) - If testing locally without an S3 instance, set local to true.
- gameurl should reference the IP of your development machine
# If you are on Windows - callbackurl should reference the IP of your server
- Edit docker-compose.Example.yml
Now that all of the files are configured: start up powershell as administrator: - Under services->server, add the following lines right above image: rogueserver:latest
``` ```
cd C:\api\server\location\ env_file:
go build . - beta.env
.\rogueserver.exe --debug --dbuser yourusername --dbpass yourpassword
``` ```
The other available flags are located in rogueserver.go:34-43. - Under services->db, add the port the database will use.
Then in another run this the first time then run `npm run start` from the rogueserver location from then on:
``` ```
powershell -ep bypass ports:
cd C:\server\location\ - "3306:3306"
npm install
npm run start
``` ```
You will need to allow the port youre running the API (8001) on and port 8000 to accept inbound connections through the [Windows Advanced Firewall](https://www.youtube.com/watch?v=9llH5_CON-Y). ### Booting up Rogueserver
- First, compile the code with
# If you are on Linux
In whatever shell you prefer, run the following:
``` ```
cd /api/server/location/
go build . go build .
./rogueserver --debug --dbuser yourusername --dbpass yourpassword & ```
- Then run the command
cd /server/location/ ```
npm run start docker build ./ -t rogueserver
```
- Finally, run the command with the Docker file you just configured!
```
docker-compose -f docker-compose.Example.yml up -d
```
### Connecting your PokeRogue to RogueServer
- Find .env.development in your PokeRogue repo and update it with the following changes
- To access PokeRogue's account features, you need to set VITE_BYPASS_LOGIN to 0 here too
- Update VITE_SERVER_URL with the correct machine if your server is running on a different machine than your development machine.
- In utils.ts, around lines 280-300, remove the Secure headers from the document.cookie variables. For example:
```
document.cookie = `${cName}=${cValue};Secure;SameSite=Strict;Domain=${window.location.hostname};Path=/;Expires=${expiration.toUTCString()}`;
```
should be changed to
```
document.cookie = `${cName}=${cValue};SameSite=Strict;Domain=${window.location.hostname};Path=/;Expires=${expiration.toUTCString()}`;
``` ```
The docker compose file should automatically implement a container with mariadb with an empty database and the default user and password combo of pokerogue:pokerogue
# If you are on Windows
You will need to allow the port youre running the API (8001) on and port 8000 to accept inbound connections through the [Windows Advanced Firewall](https://www.youtube.com/watch?v=9llH5_CON-Y).
# If you are on Linux
If you have a firewall running such as ufw on your linux machine, make sure to allow inbound connections on the ports youre running the API and the pokerogue server (8000,8001). If you have a firewall running such as ufw on your linux machine, make sure to allow inbound connections on the ports youre running the API and the pokerogue server (8000,8001).
An example to allow incoming connections using UFW: An example to allow incoming connections using UFW:
``` ```
@ -80,4 +94,7 @@ Make sure that both 8000 and 8001 are portforwarded on your router.
Test that the server's game and game authentication works from other machines both in and outside of the network. Once this is complete, enjoy! Test that the server's game and game authentication works from other machines both in and outside of the network. Once this is complete, enjoy!
### Contributors
- Instructions by Opaquer

@ -5,6 +5,7 @@ VITE_DISCORD_CLIENT_ID=1248062921129459756
VITE_GOOGLE_CLIENT_ID=955345393540-2k6lfftf0fdnb0krqmpthjnqavfvvf73.apps.googleusercontent.com VITE_GOOGLE_CLIENT_ID=955345393540-2k6lfftf0fdnb0krqmpthjnqavfvvf73.apps.googleusercontent.com
VITE_I18N_DEBUG=1 VITE_I18N_DEBUG=1
debug=true debug=true
local=false
dbaddr=db dbaddr=db
dbuser=pokerogue dbuser=pokerogue
dbpass=pokerogue dbpass=pokerogue

Loading…
Cancel
Save