Compare commits
2 Commits
65e87129a6
...
c3b570dd24
| Author | SHA1 | Date | |
|---|---|---|---|
| c3b570dd24 | |||
| 5547e8373e |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
bin/
|
||||
6
Makefile
6
Makefile
@ -1,6 +1,6 @@
|
||||
svn_revision = $(shell svn info --show-item revision)
|
||||
svn_revision = $(shell git describe --always --dirty --tags --long)
|
||||
|
||||
#LDFLAGS = "-X main.version=$(svn_revision)"
|
||||
LDFLAGS = "-X main.version=$(svn_revision)"
|
||||
|
||||
build:
|
||||
@echo "Building the website..."
|
||||
@ -22,7 +22,7 @@ run:
|
||||
production/deploy:
|
||||
rsync -rP --delete bin/linux_amd64 alfheim@alfheimgame.com:/home/alfheim
|
||||
rsync -P remote/production/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'
|
||||
ssh -t root@alfheimgame.com 'systemctl daemon-reload && systemctl stop alfheim-website.service && mv /home/alfheim/alfheim-website.service /etc/systemd/system && systemctl enable alfheim-website && systemctl restart alfheim-website'
|
||||
|
||||
.PHONY: production/connect
|
||||
production/connect:
|
||||
|
||||
@ -66,30 +66,6 @@ func main() {
|
||||
|
||||
mux := http.NewServeMux()
|
||||
|
||||
//rows, err := db.Query("SELECT * FROM accounts")
|
||||
//if err != nil {
|
||||
// log.Fatal(err)
|
||||
//}
|
||||
//defer rows.Close()
|
||||
|
||||
//accounts := make([]*Account, 0)
|
||||
//for rows.Next() {
|
||||
// acc := new(Account)
|
||||
// err := rows.Scan(&acc.id, &acc.Username, &acc.password, &acc.Colour)
|
||||
// if err != nil {
|
||||
// log.Fatal(err)
|
||||
// }
|
||||
// accounts = append(accounts, acc)
|
||||
//}
|
||||
|
||||
//if err = rows.Err() err != nil {
|
||||
// log.Fatal(err)
|
||||
//}
|
||||
|
||||
//for _, acc := range accounts {
|
||||
// log.Println(acc)
|
||||
//}
|
||||
|
||||
mux.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("ui/static"))))
|
||||
|
||||
mux.HandleFunc("/favicon.ico", favicon)
|
||||
|
||||
@ -4,7 +4,7 @@ Description=alfheimgame.com website service
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
StartLimitIntervalSec=600
|
||||
StartLimitIntervalSec=60
|
||||
StartLimitBurst=5
|
||||
|
||||
[Service]
|
||||
@ -15,8 +15,8 @@ CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
EnvironmentFile=/etc/environment
|
||||
WorkingDirectory=/home/alfheim/linux_amd64
|
||||
ExecStart=/home/alfheim/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
|
||||
#ExecStart=/home/alfheim/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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user