diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..a0fa113 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +accounting +node_modules +pkg/frontend/assets/app.* +pkg/frontend/assets/*.ttf +pkg/frontend/assets/*.woff2 +test.db diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 52d5ff0..0000000 --- a/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -@fortawesome:registry=https://npm.fontawesome.com/ -//npm.fontawesome.com/:_authToken=${FONTAWESOME_NPM_AUTH_TOKEN} diff --git a/Makefile b/Makefile index 6be1007..8a9f65a 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,10 @@ PORT := 5000 default: build +build: export CGO_ENABLED=0 build: frontend go build \ - -ldflags "-X main.version=$(shell git describe --tags --always || echo dev)" \ + -ldflags "-s -w -X main.version=$(shell git describe --tags --always || echo dev)" \ -mod=readonly \ -trimpath @@ -14,7 +15,7 @@ frontend: node_modules node ci/build.mjs node_modules: - vault2env --key secret/jenkins/fontawesome -- npm ci --include=dev + npm ci --include=dev run: frontend - envrun -- go run . --listen=:$(PORT) + go run . --listen=:$(PORT) diff --git a/README.md b/README.md index 1f940b4..8f664da 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,12 @@ In short: Maybe. Longer version: This software started as a system to do **my** ## How to run it? -For local testing just clone the repo, ensure you got a fairly new `nodejs` (including NPM) and `go` toolchain installed, adjust `node_modules` and `run` targets in the `Makefile` and +For local testing just clone the repo, ensure you got a fairly new `nodejs` (including NPM) and `go` toolchain installed and ```console -# make run FONTAWESOME_NPM_AUTH_TOKEN=your-fa-pro-token +# make run ``` then go to http://localhost:5000/ and try it. -To really host it, `make build` it (you need to find a way to get your FA Pro Token into the build and most likely you will need to edit the `node_modules` target in the `Makefile`), put it on your server and let it run. (It's a binary so probably use systemd to run it and an nginx as proxy in front of it doing auth-stuff…) +To really host it, `make build` it, put it on your server and let it run. (It's a binary so probably use systemd to run it and an nginx as proxy in front of it doing auth-stuff…) diff --git a/frontend/components/accountsSidebar.vue b/frontend/components/accountsSidebar.vue index 43f0dfb..d49c304 100644 --- a/frontend/components/accountsSidebar.vue +++ b/frontend/components/accountsSidebar.vue @@ -43,7 +43,7 @@