traggo / server

self-hosted tag-based time tracking
https://traggo.net
GNU General Public License v3.0
1.21k stars 58 forks source link

Multi-stage docker builds for easier development setups #115

Closed Skeen closed 2 years ago

Skeen commented 2 years ago

Is your feature request related to a problem? Please describe. Getting a development setup up and running is tedious.

To get a development setup, I had to:

Describe the solution you'd like My first approach to building the project was the solution I would like, namely, simply running:

docker build -f docker/Dockerfile .

I expected this to do a multi-stage build, with the first-stage producing the traggo binary, and the second stage containing the current contents of the Dockerfile making a small image.

Describe alternatives you've considered Not working on the project and instead looking for another time-tracking software.

jmattheis commented 2 years ago

When developing you normally want to use dev modes of the server / ui, for this you normally don't need packr2 as it'll work without it. I didn't use the docker build for development, thus, it isn't optimized for this. I'd be open to include another Dockerfile for development.

You probably don't have the go bin folder on your path, this made the make build-bin thingy fail.

Skeen commented 2 years ago

Hello @jmattheis, I made a PR that simply builds the source so you can get a stack up and running with one command. I am a Go-programmer and I do not know the tools usually used for Go-development.

What are the dev modes of the server and ui that you speak of, and what commands would you usually run? - I imagine there's support for hot-reloading somehow?

jmattheis commented 2 years ago

Yeah, there is hot reloading for the UI, it can be started with yarn start. See https://traggo.net/dev/setup/