-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
10 changed files
with
314 additions
and
87 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/db/ | ||
/node_modules/ | ||
/frontend/node_modules/ | ||
/backend/node_modules/ | ||
/vendor/ | ||
.env |
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
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
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 |
---|---|---|
@@ -1,43 +1,41 @@ | ||
# CHS MC Website | ||
|
||
This is the CHS MC website that can be found here [mc.chs.se][1] | ||
This is the CHS MC website that can be found here [mc.chs.se](https://mc.chs.se/). | ||
|
||
## Requirement | ||
The source code for the old CHS MC website can be found here on [github](https://github.com/gudchalmers/chs-mc-website/tree/aa622740b57cfc073a5d3f4b9321ecb184ad7804). | ||
|
||
* Requires a database with a `mc_stats` table | ||
* Webserver with php, [composer][2] and [nodejs][3] | ||
|
||
## Setup | ||
## Development | ||
```shell script | ||
cd frontend | ||
npm install | ||
npm run prod | ||
|
||
Rename the `.env.example` to `.env` and modify it to the current environment. | ||
cd .. | ||
cd backend | ||
npm install | ||
npx nodemon index.js | ||
``` | ||
|
||
The site is served out of the `public` folder. | ||
For frontend development you probably want a better setup. | ||
|
||
To setup the dev run: | ||
## Deployment | ||
|
||
```shell script | ||
composer install | ||
npm install | ||
npm run dev | ||
# or | ||
npm run watch | ||
``` | ||
Using docker-compose: | ||
|
||
To setup the production site run: | ||
```yml | ||
version: '3' | ||
|
||
```shell script | ||
composer install --optimize-autoloader --no-dev | ||
npm install --production | ||
npm run prod | ||
services: | ||
chs-mc-website: | ||
image: ghcr.io/gudchalmers/chs-mc-website:main | ||
container_name: chs-mc-website | ||
restart: unless-stopped | ||
ports: | ||
- "3000:3000" | ||
``` | ||
Copy the latest version of the dynmap website files from the plugin folder to the `public/dynmap` folder. | ||
|
||
## License | ||
|
||
[MIT][4] | ||
|
||
[1]: https://mc.chs.se/ | ||
[2]: https://getcomposer.org/ | ||
[3]: https://nodejs.org/ | ||
[4]: https://choosealicense.com/licenses/mit/ | ||
[MIT](https://choosealicense.com/licenses/mit/) |
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 |
---|---|---|
|
@@ -60,7 +60,33 @@ <h1 class="title"> | |
<h2 class="title is-4">Getting started:</h2> | ||
<p class="subtitle is-6">To join the server you need to register your account with your Chalmers student | ||
email.</p> | ||
<div class="tile notification is-info has-text-left"> | ||
<form id="register-form" action="/register" method="POST"> | ||
<div class="field"> | ||
<label class="label">Chalmers email</label> | ||
<div class="control has-icons-left"> | ||
<input class="input" type="email" placeholder="[email protected]" required pattern=".*@chalmers.se" | ||
name="email"> | ||
<span class="icon is-small is-left"> | ||
<i class="fas fa-envelope"></i> | ||
</span> | ||
</div> | ||
</div> | ||
<div class="field"> | ||
<label class="label">Minecraft username</label> | ||
<div class="control has-icons-left"> | ||
<input class="input" type="text" placeholder="Your Minecraft username" required name="username"> | ||
<span class="icon is-small is-left"> | ||
<i class="fas fa-user"></i> | ||
</span> | ||
</div> | ||
</div> | ||
<div class="field"> | ||
<div class="control"> | ||
<input class="button is-primary" type="submit" value="Submit"> | ||
</div> | ||
</div> | ||
</form> | ||
<!-- <div class="tile notification is-info has-text-left"> | ||
<ol> | ||
<li> | ||
<p>Login to <span class="has-text-warning">auth.mc.chs.se</span> in minecraft and follow the | ||
|
@@ -70,7 +96,7 @@ <h2 class="title is-4">Getting started:</h2> | |
class="has-text-warning">mc.chs.se</span> and start playing. | ||
</li> | ||
</ol> | ||
</div> | ||
</div> --> | ||
<hr> | ||
<div> | ||
<a target="_blank" href="https://gud.chs.chalmers.se"> | ||
|
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
Oops, something went wrong.