-
Notifications
You must be signed in to change notification settings - Fork 28
Home
To restart the server and deploy the latest, just ssh into libgdx.badlogicgames.com, type screen -r
, type CTRL+C, type start.sh
. That's it.
See the screen reference on how to use screen.
The site is composed of two things: a REST-like server written in Dropwizard and a simple web frontend. All of that is deployed to libgdx.badlogicgames.com, in /opt/libgdx-site
to which this repo is cloned. Once cloned, we run this:
git pull
cd src/main/webapp
./build.sh
cd ../../..
mvn clean package
cp -r src/main/webapp/* /usr/share/nginx/html/
java -jar target/libgdx-site-jar-with-dependencies.jar
build.sh
compiles the web frontend sources in src/main/webapp/src
. These are then copied to /usr/share/nginx/html
from which the frontend of the website is served. Next we compiled the backend via maven and start it up as a fat jar. It's responsible for the gallery of the website. Gallery submissions are stored to /opt/gamedb
, one file per entry (yes it's a flat file storage cause i'm lazy :D)
All requests from the frontend to the backend are port forwarded by nginx (see /etc/nginx/sites-available/default
):
location /libgdx-site/ {
proxy_pass http://127.0.0.1:7777;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
The backend is listening on port 7777, nginx will forward any requests to libgdx.badlogicgames.com/libgdx-site/ to that port, dropping the libgdx-site/ path segment.