Skip to content

ShardBytes/shardcore

Repository files navigation

Build Status

NOTE: this server is no longer in use, we use Shardium private TypeScript stack now

Welcome, my dude

ShardCore = our main JVM server for our page, also basically our VPS idk

this also includes notes for setting up the whole vps

pls visit -> shardbytes.com (if it's not down) ( it probably is lmao )

Based on Javalin, KMongo, Thymeleaf, Angular and other weird things which apparently seem popular in web industry and I like them lmao. Writen with love, tears and Kotlin <3.

Notes

  • To run server one needs to specify configuration in config.json
    • ( or specify java argument with config file path in ./run )
    • ( see configTemplate.json )
    • run server by executing run command from anywhere

Create "static" and "logs" directories because the server serves them statically (or Javalin will rage)

deploy ?

  • use Jenkins faggt

Service

  • see shardcore.service, place in /etc/systemd/system and use ->
    • start/restart/stop -> sudo systemctl start/restart/stop shardcore
    • logs tail -> sudo journalctl -f -u shardcore
    • last 100 lines of logs ? -> sudo journalctl -n 100 --no-pager -u shardcore

RECONFIGURE FIREWALL PORTFORWARDING

enable build shields for readme in Jenkins ?

Setup gradle

  • get gradle bin
  • extract in /opt/gradle or something so bin is in there
  • ln-s that faggt to /usr/local/bin

Jenkins setup and stuff

  • install https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins+on+Ubuntu
  • setup with 8080 (open port ufw)
  • get access to jenkins linuxaccount (maybe same password as setup ?)
  • setup SSL certificate (Java keystore .jks) -> edit /etc/default/jenkins -> replace last line : JENKINS_ARGS="--webroot=/var/cache/$NAME/war --httpPort=-1 --httpsPort=10099 --httpsKeyStore=/var/lib/jenkins/jenkins.jks --httpsKeyStorePassword=<password>"
  • ( add jenkins.jks ssl certificate to /var/lib/jenkins directory and change password here)
  • reboot or something, jenkins should be running with SSL on port 10099

Make Jenkins keep Gradle daemon -> but you will do fine by disabling it

  • without daemon it takes only like 30s for one build so better disable it so it doesnt eat all the ram, (https://marschall.github.io/2016/08/06/disabling-gradle-daemon.html)
  • for some weird reason Jenkins now kills gradle daemon after job is complete
  • to keep the Gradle daemon, we need to tel Jenkins to not kill processes
  • instead of Gradle plugin, use execute shell script:
    BUILD_ID=dontKillMe
    gradle build
    

About

💨 Core Javalin server for our vps ☁️

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •