git-svn-id: svn://losandesgames.com/alfheim-website@43 15359d88-9307-4e75-a9c1-e5686e5897df

This commit is contained in:
Vicente Ferrari Smith 2025-03-26 22:02:06 +00:00
parent 66dbdc5f79
commit df53fb7990
7 changed files with 35 additions and 24 deletions

View File

@ -1,13 +1,22 @@
build:
@echo "Building the website..."
go build -o bin/alfheimgame
rm -rf bin
mkdir bin
mkdir bin/static
mkdir bin/ui
go build -o bin/alfheim-website
cp -r ui bin
cp -r static bin
cp favicon.ico bin
GOOS=linux GOARCH=amd64 go build -o bin/linux_amd64/alfheimgame
cp Caddyfile bin
mkdir bin/linux_amd64
mkdir bin/linux_amd64/static
mkdir bin/linux_amd64/ui
GOOS=linux GOARCH=amd64 go build -o bin/linux_amd64/alfheim-website
cp -r ui bin/linux_amd64
cp -r static bin/linux_amd64
cp favicon.ico bin/linux_amd64
cp Caddyfile bin/linux_amd64
run:
@echo "Running the website..."
@ -19,5 +28,5 @@ deploy:
.PHONY: service
service:
rsync -P alfheimgame.service alfheim@alfheimgame.com:/home/alfheim
ssh -t root@alfheimgame.com 'mv /home/alfheim/alfheimgame.service /etc/systemd/system && systemctl enable alfheimgame && systemctl restart alfheimgame'
rsync -P alfheim-website.service alfheim@alfheimgame.com:/home/alfheim
ssh -t root@alfheimgame.com 'mv /home/alfheim/alfheim-website.service /etc/systemd/system && systemctl enable alfheim-website && systemctl restart alfheim-website'

View File

@ -15,8 +15,8 @@ CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE
EnvironmentFile=/etc/environment
WorkingDirectory=/home/alfheim/linux_amd64
#ExecStart=/go/bin/dlv --listen=:4321 --headless=true --log=true exec /home/alfheim/linux_amd64/alfheimgame -- -production
ExecStart=/home/alfheim/linux_amd64/alfheimgame -production
#ExecStart=/go/bin/dlv --listen=:4321 --headless=true --log=true exec /home/alfheim/linux_amd64/alfheim-website -- -production
ExecStart=/home/alfheim/linux_amd64/alfheim-website -production
Restart=on-failure
RestartSec=5

Binary file not shown.

BIN
bin/linux_amd64/alfheim-website Executable file

Binary file not shown.

View File

@ -1,29 +1,29 @@
html {
height: 100%;
padding: 8px;
/*background: no-repeat url(/static/image.png);
background-size: cover;
background-position: center;*/
height: 100vh;
background-color: black;
box-sizing: border-box;
}
body {
display: flex;
flex-direction: column;
justify-content: space-between;
background-color: #3475CB;
font-family: "Vollkorn";
color: white;
margin-top: 0px;
margin-bottom: 0px;
margin-left: auto;
margin-right: auto;
margin-bottom: 0px;
display: flex;
flex-direction: column;
min-height: 100%;
max-width: 900px;
min-height: 100%;
}
header {
max-width: 100%;
}
nav {
@ -65,7 +65,8 @@ nav {
}
main {
padding: 5px;
padding: 8px;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;

View File

@ -1,29 +1,29 @@
html {
height: 100%;
padding: 8px;
/*background: no-repeat url(/static/image.png);
background-size: cover;
background-position: center;*/
height: 100vh;
background-color: black;
box-sizing: border-box;
}
body {
display: flex;
flex-direction: column;
justify-content: space-between;
background-color: #3475CB;
font-family: "Vollkorn";
color: white;
margin-top: 0px;
margin-bottom: 0px;
margin-left: auto;
margin-right: auto;
margin-bottom: 0px;
display: flex;
flex-direction: column;
min-height: 100%;
max-width: 900px;
min-height: 100%;
}
header {
max-width: 100%;
}
nav {
@ -65,7 +65,8 @@ nav {
}
main {
padding: 5px;
padding: 8px;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;

View File

@ -55,11 +55,11 @@ ufw --force enable
apt --yes install fail2ban
apt --yes install certbot
sudo apt install caddy
apt --yes install caddy
# Add a DSN for connecting to the database to the system-wide environment
# variables in the /etc/environment file.
echo "ALFHEIM_DB_DSN='postgres://elves_database:${DB_PASSWORD}@vicenteferrari.com/elves_database'" >> /etc/environment
echo "ALFHEIM_DB_DSN='postgres://alfheim:${DB_PASSWORD}@alfheimgame.com/alfheim'" >> /etc/environment
echo "Script complete! Rebooting..."
reboot