├── .env ├── .gitignore ├── Dockerfile ├── FUNDING.yml ├── LICENSE ├── README.md ├── babel.config.js ├── default.conf ├── docker-compose.yml ├── jsconfig.json ├── nginx.conf ├── package-lock.json ├── package.json ├── public ├── apple-touch-icon.png ├── favicon-16x16.png ├── favicon-32x32.png ├── favicon.ico └── index.html ├── src ├── assets │ ├── bg_v2.mp4 │ ├── loader-150.webp │ ├── mosharust.png │ ├── no-banner-min.png │ ├── photo.webp │ ├── rust-marque.svg │ └── store.webp ├── components │ ├── NavBar.vue │ ├── discordSection.vue │ ├── faqSection.vue │ ├── getServer.vue │ ├── mainFooter.vue │ ├── mainIndex.vue │ ├── rulesSection.vue │ ├── staffSection.vue │ └── storeSection.vue ├── config.json ├── main.js └── rswt.vue ├── start.sh └── vue.config.js /.env: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | APP_NAME=rswt-vue 4 | APP_PORT=80 5 | APP_VER=0.0.2 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dockerignore 3 | node_modules 4 | /dist 5 | .env 6 | 7 | # local env files 8 | .env.local 9 | .env.*.local 10 | 11 | # Log files 12 | npm-debug.log* 13 | yarn-debug.log* 14 | yarn-error.log* 15 | pnpm-debug.log* 16 | 17 | # Editor directories and files 18 | .idea 19 | .vscode 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:latest AS build-stage 2 | WORKDIR /app 3 | COPY package*.json ./ 4 | RUN npm install --silent && npm install @vue/cli@5.0.8 --save -g && npm install bootstrap --save && npm install @popperjs/core --save && npm install axios --save 5 | COPY . . 6 | RUN npm run build 7 | FROM nginx:stable-alpine3.17 AS production-stage 8 | LABEL version="0.0.2" 9 | LABEL description="Rust-Server-Website-Template Vue" 10 | LABEL authors="Kirill Krasin" 11 | COPY --from=build-stage /app/dist /usr/share/nginx/html 12 | COPY nginx.conf /etc/nginx/nginx.conf 13 | COPY default.conf /etc/nginx/conf.d/default.conf 14 | COPY start.sh /start.sh 15 | RUN chmod +x /start.sh 16 | EXPOSE 80 17 | ENTRYPOINT ["/start.sh"] -------------------------------------------------------------------------------- /FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ['https://boosty.to/krasinkirill/donate', 'https://teletype.in/@kirillkrasin'] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Kirill Krasin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![GitHub license](https://img.shields.io/github/license/Mo45/Rust-Server-Website-Template.svg)](https://github.com/Mo45/Rust-Server-Website-Template/blob/master/LICENSE) [![GitHub issues](https://img.shields.io/github/issues/Mo45/Rust-Server-Website-Template.svg)](https://github.com/Mo45/Rust-Server-Website-Template/issues) [![GitHub stars](https://img.shields.io/github/stars/Mo45/Rust-Server-Website-Template)](https://github.com/Mo45/Rust-Server-Website-Template/stargazers) [![Twitter Follow](https://img.shields.io/twitter/follow/Mo_45)](https://twitter.com/Mo_45) 2 | 3 | # Rust-Server-Website-Template 4 | 5 | **Rust-Server-Website-Template** is a responsive, dynamically updated Vue 3 template for Rust server website. It is build with Bootstrap 5 and **Rust-Servers.Net** API. 6 | 7 | If you don't have **VPS/VDS** or self-hosted server buy new one at Digital Ocean, you can use [my link](https://m.do.co/c/15b90cac0063) and get a $200, 60-day credit to try it. Regular 1GB/1CPU 25GB SSD will be enough to start with. Select **Docker on Ubuntu 22.04** image at marketplace while creating your droplet. 8 | 9 | [![Rust-Server-Website-Template](https://i.imgur.com/sBn5mJH.png "Rust-Server-Website-Template Vue Screenshot")](https://i.imgur.com/sBn5mJH.png) 10 | 11 | ## Как развернуть на Рег.ру или timeweb.cloud 12 | 13 | Для того, чтобы запустить (развернуть) RSWT будет достаточно самого простого VPS с предустановленным Docker. Где и какой именно выбрать, а так-же пошаговая инструкция [вот тут](https://teletype.in/@kirillkrasin/deploy-rswt-vue-docker). 14 | 15 | ## Demo 16 | 17 | See a live demo at https://dev.mosharust.com/ 18 | 19 | ## Prepare env and clone repo 20 | ``` 21 | apt update 22 | ``` 23 | ``` 24 | git clone --branch rswt-vue https://github.com/Mo45/Rust-Server-Website-Template.git rswt 25 | ``` 26 | ``` 27 | apt install npm -y 28 | ``` 29 | ## Project setup 30 | ``` 31 | cd rswt 32 | ``` 33 | ``` 34 | npm install 35 | ``` 36 | 37 | ### Build docker image: 38 | ``` 39 | docker build -t rswt-vue . 40 | ``` 41 | 42 | ### Run Docker container 43 | ``` 44 | docker run -p 80:80 rswt-vue 45 | ``` 46 | This command will run the container with default configuration, mapping port 80 on your host to port 80 in the container. Your rswt.js app should now be accessible at http://your_vps_ip:80. Check it running and all works, then stop the container by pressing ```ctrl+c```. 47 | 48 | ## Customize your website 49 | 50 | To do so edit ```src\config.json``` and follow comments: 51 | 52 | ``` 53 | { 54 | "TITLE_SHORT": "RSWT Vue App", <-- Short title, used for example as page title tag, etc. 55 | "TITLE_FULL": "Mega Awesome Servers", <-- Main title, used as h1 title, footer copytright, etc. 56 | "PRJ_SLOGAN": "Most Amazing Rust Servers", <-- Subtitle used as h2 title, etc 57 | "DISCORD_ID": "XXXXXXXXXXXXXXXXXX", <-- Your Discord server ID, used to get server stats 58 | 59 | "S1_API_KEY": "YOUR_API_KEY", <-- Rust-Servers.Net API Key for first server 60 | "S1_BANNER": "mosharust.png", <-- Banner image for first server 61 | "S1_DESC": "The original experience", <-- Short description of first server 62 | 63 | "S2_API_KEY": "YOUR_API_KEY", <-- Rust-Servers.Net API Key for second server 64 | "S2_BANNER": "mosharust.png", <-- Banner image for second server 65 | "S2_DESC": "Another cool description", <-- Short description of second server 66 | 67 | "S3_API_KEY": "YOUR_API_KEY", 68 | "S3_BANNER": "mosharust.png", 69 | "S3_DESC": "Another cool description", 70 | 71 | "S4_API_KEY": "YOUR_API_KEY", 72 | "S4_BANNER": "mosharust.png", 73 | "S4_DESC": "Another cool description" 74 | } 75 | ``` 76 | 77 | Don't forget to edit another components, like **FAQ**, **Staff**, **Rules** etc. To do so edit ```components\faqSection.vue```, ```components\rulesSection.vue```, ```components\staffSection.vue```, ```components\storeSection.vue``` by following comments. It's self explanatory basic HTML. 78 | 79 | ### Run Docker container after your changes 80 | ``` 81 | docker compose up -d --build 82 | ``` 83 | This command will force build and run the container in detached mode, mapping port 80 on your host to port 80 in the container. Your rswt.js app should now be accessible at http://your_vps_ip:80. 84 | 85 | If you need to bind app to another port (not **80**) edit **.env** file in rswt folder: 86 | 87 | ``` 88 | #!/usr/bin/env bash 89 | 90 | APP_NAME=rswt-vue 91 | APP_PORT=80 <-- Change to desired port 92 | APP_VER=0.0.2 93 | ``` 94 | 95 | ## Copyright :copyright: 96 | 97 | > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 98 | > - MIT License 99 | 100 | This is the reason why you're seeing these notices above. So legally, these notices shouldn't be removed from the works/files in which they're found. 101 | 102 | If you really need to remove copyright from your project page, Send me at least a tip [Boosty](https://boosty.to/krasinkirill/donate). -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /default.conf: -------------------------------------------------------------------------------- 1 | # /etc/nginx/conf.d/default.conf 2 | 3 | server { 4 | listen 80; 5 | 6 | server_name localhost; 7 | 8 | location / { 9 | root /usr/share/nginx/html; 10 | index index.html index.htm; 11 | try_files $uri $uri/ /index.html; 12 | } 13 | 14 | error_page 500 502 503 504 /50x.html; 15 | location = /50x.html { 16 | root /usr/share/nginx/html; 17 | } 18 | } -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | rswt: 4 | container_name: ${APP_NAME} 5 | hostname: ${APP_NAME} 6 | image: kirillkrasin/rswt-vue:${APP_VER} 7 | build: 8 | context: . 9 | dockerfile: Dockerfile 10 | volumes: 11 | - '.:/app' 12 | - '/app/node_modules' 13 | ports: 14 | - '${APP_PORT}:80' 15 | restart: always 16 | logging: 17 | options: 18 | max-size: '10m' 19 | max-file: '3' -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "esnext", 5 | "baseUrl": "./", 6 | "moduleResolution": "node", 7 | "paths": { 8 | "@/*": [ 9 | "src/*" 10 | ] 11 | }, 12 | "lib": [ 13 | "esnext", 14 | "dom", 15 | "dom.iterable", 16 | "scripthost" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /nginx.conf: -------------------------------------------------------------------------------- 1 | # /etc/nginx/nginx.conf 2 | 3 | user nginx; 4 | worker_processes 1; 5 | 6 | error_log /var/log/nginx/error.log warn; 7 | pid /var/run/nginx.pid; 8 | 9 | events { 10 | worker_connections 1024; 11 | } 12 | 13 | http { 14 | include /etc/nginx/mime.types; 15 | default_type application/octet-stream; 16 | 17 | log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 18 | '$status $body_bytes_sent "$http_referer" ' 19 | '"$http_user_agent" "$http_x_forwarded_for"'; 20 | 21 | access_log /var/log/nginx/access.log main; 22 | 23 | sendfile on; 24 | #tcp_nopush on; 25 | 26 | keepalive_timeout 65; 27 | 28 | #gzip on; 29 | 30 | include /etc/nginx/conf.d/*.conf; 31 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rswt-vue", 3 | "version": "0.0.2", 4 | "description": "Rust Website Template Vue", 5 | "author": "Kirill Krasin ", 6 | "private": true, 7 | "scripts": { 8 | "serve": "vue-cli-service serve", 9 | "build": "vue-cli-service build", 10 | "lint": "vue-cli-service lint" 11 | }, 12 | "dependencies": { 13 | "core-js": "^3.8.3", 14 | "vue": "^3.2.13", 15 | "bootstrap": "~5.3.3", 16 | "@popperjs/core": "~2.11.8", 17 | "axios": "^1.7.5", 18 | "postcss": ">=8.4.31" 19 | }, 20 | "devDependencies": { 21 | "@babel/core": "^7.12.16", 22 | "@babel/eslint-parser": "^7.12.16", 23 | "@vue/cli-plugin-babel": "~5.0.0", 24 | "@vue/cli-plugin-eslint": "~5.0.0", 25 | "@vue/cli-service": "~5.0.0", 26 | "eslint": "^7.32.0", 27 | "bootstrap": "~5.3.3", 28 | "@popperjs/core": "~2.11.8", 29 | "axios": "^1.7.5", 30 | "postcss": ">=8.4.31", 31 | "eslint-plugin-vue": "^8.0.3" 32 | }, 33 | "eslintConfig": { 34 | "root": true, 35 | "env": { 36 | "node": true 37 | }, 38 | "extends": [ 39 | "plugin:vue/vue3-essential", 40 | "eslint:recommended" 41 | ], 42 | "parserOptions": { 43 | "parser": "@babel/eslint-parser" 44 | }, 45 | "rules": {} 46 | }, 47 | "browserslist": [ 48 | "> 1%", 49 | "last 2 versions", 50 | "not dead", 51 | "not ie 11" 52 | ] 53 | } 54 | -------------------------------------------------------------------------------- /public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mo45/Rust-Server-Website-Template/e234533e34f4e5d9f3e9196f285351a303b10d43/public/apple-touch-icon.png -------------------------------------------------------------------------------- /public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mo45/Rust-Server-Website-Template/e234533e34f4e5d9f3e9196f285351a303b10d43/public/favicon-16x16.png -------------------------------------------------------------------------------- /public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mo45/Rust-Server-Website-Template/e234533e34f4e5d9f3e9196f285351a303b10d43/public/favicon-32x32.png -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mo45/Rust-Server-Website-Template/e234533e34f4e5d9f3e9196f285351a303b10d43/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | <%= htmlWebpackPlugin.options.title %> 14 | 15 | 16 | 19 |
20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/assets/bg_v2.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mo45/Rust-Server-Website-Template/e234533e34f4e5d9f3e9196f285351a303b10d43/src/assets/bg_v2.mp4 -------------------------------------------------------------------------------- /src/assets/loader-150.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mo45/Rust-Server-Website-Template/e234533e34f4e5d9f3e9196f285351a303b10d43/src/assets/loader-150.webp -------------------------------------------------------------------------------- /src/assets/mosharust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mo45/Rust-Server-Website-Template/e234533e34f4e5d9f3e9196f285351a303b10d43/src/assets/mosharust.png -------------------------------------------------------------------------------- /src/assets/no-banner-min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mo45/Rust-Server-Website-Template/e234533e34f4e5d9f3e9196f285351a303b10d43/src/assets/no-banner-min.png -------------------------------------------------------------------------------- /src/assets/photo.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mo45/Rust-Server-Website-Template/e234533e34f4e5d9f3e9196f285351a303b10d43/src/assets/photo.webp -------------------------------------------------------------------------------- /src/assets/rust-marque.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/assets/store.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mo45/Rust-Server-Website-Template/e234533e34f4e5d9f3e9196f285351a303b10d43/src/assets/store.webp -------------------------------------------------------------------------------- /src/components/NavBar.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/components/discordSection.vue: -------------------------------------------------------------------------------- 1 | 36 | 37 | 38 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/components/faqSection.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/components/getServer.vue: -------------------------------------------------------------------------------- 1 | 52 | 53 | 54 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /src/components/mainFooter.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/components/mainIndex.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 29 | 30 | 31 | 47 | -------------------------------------------------------------------------------- /src/components/rulesSection.vue: -------------------------------------------------------------------------------- 1 | 37 | 38 | 39 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/components/staffSection.vue: -------------------------------------------------------------------------------- 1 | 43 | 44 | 45 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/components/storeSection.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 29 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "TITLE_SHORT": "RSWT Vue App", 3 | "TITLE_FULL": "Mega Awesome Servers", 4 | "PRJ_SLOGAN": "Most Amazing Rust Servers", 5 | "DISCORD_ID": "450335953488314368", 6 | 7 | "S1_API_KEY": "fkil0HQ6V8Blf3PBBM4rwkEkl2dgG5DwrhN", 8 | "S1_BANNER": "mosharust.png", 9 | "S1_DESC": "The original experience", 10 | 11 | "S2_API_KEY": "67OJLXAxoOBLxopKBSvWsl9TvDXqQUHYucP", 12 | "S2_BANNER": "mosharust.png", 13 | "S2_DESC": "Another cool description", 14 | 15 | "S3_API_KEY": "67OJLXAxoOBLxopKBSvWsl9TvDXqQUHYucP", 16 | "S3_BANNER": "mosharust.png", 17 | "S3_DESC": "Another cool description", 18 | 19 | "S4_API_KEY": "67OJLXAxoOBLxopKBSvWsl9TvDXqQUHYucP", 20 | "S4_BANNER": "mosharust.png", 21 | "S4_DESC": "Another cool description" 22 | } -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import rswt from './rswt.vue' 3 | import "bootstrap/dist/css/bootstrap.min.css" 4 | import "bootstrap" 5 | 6 | const app = createApp(rswt); 7 | app.mount("#app"); 8 | -------------------------------------------------------------------------------- /src/rswt.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 104 | 105 | 245 | -------------------------------------------------------------------------------- /start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Exit immediately if a command exits with a non-zero status 3 | set -e 4 | # Start nginx 5 | nginx -g "daemon off;" 6 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | const { defineConfig } = require('@vue/cli-service') 2 | module.exports = defineConfig({ 3 | transpileDependencies: true 4 | }) 5 | --------------------------------------------------------------------------------