git-svn-id: svn://losandesgames.com/alfheim-website@43 15359d88-9307-4e75-a9c1-e5686e5897df
This commit is contained in:
parent
66dbdc5f79
commit
df53fb7990
17
Makefile
17
Makefile
@ -1,13 +1,22 @@
|
|||||||
build:
|
build:
|
||||||
@echo "Building the website..."
|
@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 ui bin
|
||||||
cp -r static bin
|
cp -r static bin
|
||||||
cp favicon.ico 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 ui bin/linux_amd64
|
||||||
cp -r static bin/linux_amd64
|
cp -r static bin/linux_amd64
|
||||||
cp favicon.ico bin/linux_amd64
|
cp favicon.ico bin/linux_amd64
|
||||||
|
cp Caddyfile bin/linux_amd64
|
||||||
|
|
||||||
run:
|
run:
|
||||||
@echo "Running the website..."
|
@echo "Running the website..."
|
||||||
@ -19,5 +28,5 @@ deploy:
|
|||||||
|
|
||||||
.PHONY: service
|
.PHONY: service
|
||||||
service:
|
service:
|
||||||
rsync -P alfheimgame.service alfheim@alfheimgame.com:/home/alfheim
|
rsync -P alfheim-website.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'
|
ssh -t root@alfheimgame.com 'mv /home/alfheim/alfheim-website.service /etc/systemd/system && systemctl enable alfheim-website && systemctl restart alfheim-website'
|
||||||
|
|||||||
@ -15,8 +15,8 @@ CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
|||||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||||
EnvironmentFile=/etc/environment
|
EnvironmentFile=/etc/environment
|
||||||
WorkingDirectory=/home/alfheim/linux_amd64
|
WorkingDirectory=/home/alfheim/linux_amd64
|
||||||
#ExecStart=/go/bin/dlv --listen=:4321 --headless=true --log=true exec /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/alfheimgame -production
|
ExecStart=/home/alfheim/linux_amd64/alfheim-website -production
|
||||||
|
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
Binary file not shown.
BIN
bin/linux_amd64/alfheim-website
Executable file
BIN
bin/linux_amd64/alfheim-website
Executable file
Binary file not shown.
@ -1,29 +1,29 @@
|
|||||||
html {
|
html {
|
||||||
height: 100%;
|
|
||||||
padding: 8px;
|
|
||||||
/*background: no-repeat url(/static/image.png);
|
/*background: no-repeat url(/static/image.png);
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: center;*/
|
background-position: center;*/
|
||||||
|
height: 100vh;
|
||||||
background-color: black;
|
background-color: black;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
background-color: #3475CB;
|
background-color: #3475CB;
|
||||||
font-family: "Vollkorn";
|
font-family: "Vollkorn";
|
||||||
color: white;
|
color: white;
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
|
margin-bottom: 0px;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
margin-bottom: 0px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
min-height: 100%;
|
|
||||||
max-width: 900px;
|
max-width: 900px;
|
||||||
|
min-height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
max-width: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
@ -65,7 +65,8 @@ nav {
|
|||||||
}
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
padding: 5px;
|
padding: 8px;
|
||||||
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
@ -1,29 +1,29 @@
|
|||||||
html {
|
html {
|
||||||
height: 100%;
|
|
||||||
padding: 8px;
|
|
||||||
/*background: no-repeat url(/static/image.png);
|
/*background: no-repeat url(/static/image.png);
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: center;*/
|
background-position: center;*/
|
||||||
|
height: 100vh;
|
||||||
background-color: black;
|
background-color: black;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
background-color: #3475CB;
|
background-color: #3475CB;
|
||||||
font-family: "Vollkorn";
|
font-family: "Vollkorn";
|
||||||
color: white;
|
color: white;
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
|
margin-bottom: 0px;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
margin-bottom: 0px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
min-height: 100%;
|
|
||||||
max-width: 900px;
|
max-width: 900px;
|
||||||
|
min-height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
max-width: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
@ -65,7 +65,8 @@ nav {
|
|||||||
}
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
padding: 5px;
|
padding: 8px;
|
||||||
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
4
setup.sh
4
setup.sh
@ -55,11 +55,11 @@ ufw --force enable
|
|||||||
apt --yes install fail2ban
|
apt --yes install fail2ban
|
||||||
apt --yes install certbot
|
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
|
# Add a DSN for connecting to the database to the system-wide environment
|
||||||
# variables in the /etc/environment file.
|
# 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..."
|
echo "Script complete! Rebooting..."
|
||||||
reboot
|
reboot
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user