Re:Ask HN: What's your favorite way of getting a web app up ...
by nicoburns on Sunday June 03, 2018 @05:46AM
(#17218777)
> instead of messing with cross compilation.
To be fair, cross-compilation in Go is as simple as setting and environment variable.
Re:Ask HN: What's your favorite way of getting a web app up ...
by joobus on Sunday June 03, 2018 @09:32AM
(#17219437)
Why put the source on the VPS? Go cross compilation is much easier then you make it sound.
GOOS=linux GOARCH=amd64 go build
Nim can't beat that.
Re:Ask HN: What's your favorite way of getting a web app up ...
by dom96 on Sunday June 03, 2018 @12:12PM
(#17220205)
That's awesome, I didn't realise it was that easy with Go.
Of course, I would say keeping the source on the VPS is just as easy.
Re:Ask HN: What's your favorite way of getting a web app up ...
by ngrilly on Sunday June 03, 2018 @11:00AM
(#17219832)
And what about zero downtime deploy (upgrading the app binary and updating the database schema)? It's difficult to do without some kind of reverse proxy and without a database server.
Re:Ask HN: What's your favorite way of getting a web app up ...
by dom96 on Sunday June 03, 2018 @12:10PM
(#17220193)
How often is that really required? OP asked for a quick deploy, for most apps it's enough to put the db into read-only mode and then update the schema. Upgrading the app binary is as simple as replacing it on the file system and then restarting the service.
Re:Ask HN: What's your favorite way of getting a web app up ...
by ngrilly on Sunday June 03, 2018 @01:24PM
(#17220574)
The more often we deploy with CI/CD, the more we need zero downtime deploy. Putting the DB in read-only mode is not that simple, because the app needs to be able to work in a degraded read-only mode.
Re:Ask HN: What's your favorite way of getting a web app up ...
by marcus_holmes on Sunday June 03, 2018 @11:00PM
(#17224234)
Yeah DB migrations are a pain in the bum. I do them manually because I still haven't found a tool that handles them properly.
But by the time there's significant data to migrate to the new schema, any schema change is usually due to a major version change or feature implementation, and the migration is part of a wider pain-in-the-bum situation.
Re:Ask HN: What's your favorite way of getting a web app up ...
by BLanen on Sunday June 03, 2018 @05:46AM
(#17218773)
Better would be to just use docker.
Re:Ask HN: What's your favorite way of getting a web app up ...
by marcus_holmes on Sunday June 03, 2018 @10:40PM
(#17224132)
Please explain. I still don't understand the use-case for docker...
How is docker going to make my life easier in this example?
Also use sqlite to avoid the pain of setting up a SQL server, there is no need for it.
You can then easily get systemd to supervise your binary.
This is how I host all my web apps, the main difference is that I don't use Go but Nim. If you want a great framework match up then check out Jester + Karax, see how I developed the Nim Forum using this combination.