afcd7c4198
go(run.go): consolidate flag names
continuous-integration/drone/push Build is passing
2023-08-12 14:57:56 +02:00
1106359a3e
go(app/server.go): rename func
continuous-integration/drone/push Build is passing
2023-08-11 23:18:54 +02:00
1e1f54023e
go(run.go): add a way to load local breach data
continuous-integration/drone/push Build is passing
2023-08-10 19:06:13 +02:00
9ac8810f67
go: change how logger is initialised
...
continuous-integration/drone/push Build is passing
* init in run.go
* use slogger instead of slog in main
* print different messages based on whether we're initialising or
re-initialising slogger..
2023-08-02 15:26:51 +02:00
8e25f30cd8
go,containerfile: fix embedding version, add flag
...
continuous-integration/drone/push Build is passing
* handle build args correctly in the multi-stage Containerfile
* use -ldflags instead of GOLDFLAGS in the Containerfile
* add version flag
* print version when the application starts
2023-07-29 23:37:30 +02:00
c1e23847a8
run.go: make use of the ok chan
continuous-integration/drone/push Build is passing
2023-07-19 21:51:05 +02:00
7cf26a73e3
go: add importFlag
continuous-integration/drone/push Build is passing
2023-07-19 18:25:46 +02:00
32aa8d8852
go: add+enable compression middleware
continuous-integration/drone/push Build is passing
2023-05-31 22:42:50 +02:00
ff68a7dbe3
go: fix port default,flag handling
continuous-integration/drone/push Build is passing
2023-05-23 16:37:33 +02:00
9972551239
run: improve config load err message
continuous-integration/drone/push Build is passing
2023-05-21 18:59:12 +02:00
6ce05ea74d
feat: add initial admin user creation
...
continuous-integration/drone/push Build is passing
have the app create the initial admin user:
* if the db has not yet been set up
* if there are not users
* if the config value for Init.CreateAdmin is True
* if the admin password is not empty
default username, email values can be seen in modules/user/const.go
2023-05-21 18:50:41 +02:00
744090aa9a
enable erasing ENVs
continuous-integration/drone/push Build is passing
2023-05-21 16:00:22 +02:00
3a2f85f683
feat: add license headers (+spdx id)
continuous-integration/drone/push Build is passing
2023-05-20 20:15:57 +02:00
ac7c1ae431
add TODOs [skip ci]
2023-05-17 20:55:09 +02:00
72723d951d
go(refactor): clean up run.go
continuous-integration/drone/push Build is passing
2023-05-17 20:40:24 +02:00
4de0576c26
go: add some more startup checks for DB
continuous-integration/drone/push Build is passing
2023-05-17 13:35:13 +02:00
e5980b15e5
update TODOs [skip ci]
2023-05-17 13:21:14 +02:00
3a86905b14
config: rename LoadConfig to Load
continuous-integration/drone/push Build is passing
2023-05-13 19:44:32 +02:00
1fb7479d8e
slogger: rename Logger to Slogger
continuous-integration/drone/push Build is passing
2023-05-11 17:06:20 +02:00
355f09bf5a
set embeds early to prevent nil pointer derefs
continuous-integration/drone/push Build is passing
2023-05-11 04:40:10 +02:00
a879704535
go: partially rework how slogging works
continuous-integration/drone/push Build is passing
2023-05-09 17:35:00 +02:00
0a34bca1c1
go: allow choosing db type, setting connstr
continuous-integration/drone/push Build is passing
2023-05-05 23:10:56 +02:00
f1bb52c58f
go: add a setting val for whether db is set up
continuous-integration/drone/push Build is passing
2023-05-05 22:58:13 +02:00
b1ab686493
go: add db module for preps/checks
continuous-integration/drone/push Build is passing
2023-05-05 22:52:59 +02:00
dfdcc77737
conf: add pretty printing,raw conf, conf tests
...
continuous-integration/drone/push Build is passing
* also, set debug logger directly in config if devel mode is set
* add new flag to indicate whether the passed config is path or raw
config
2023-05-04 23:49:25 +02:00
746eb82f67
go: make sure flags are properly checked
continuous-integration/drone/push Build is passing
2023-05-04 21:28:30 +02:00
672132a109
go: die even more reliably on error
continuous-integration/drone/push Build is passing
2023-05-03 05:58:09 +02:00
1359750c97
go: handle long running shutdowns better
continuous-integration/drone/push Build is passing
2023-05-03 04:58:47 +02:00
6937eb7a80
go: explicitly close chan
continuous-integration/drone/push Build is passing
2023-05-03 04:57:04 +02:00
ed14e45969
go: add more tests (+return instead of exit)
continuous-integration/drone/push Build is passing
2023-05-03 04:26:42 +02:00
1ba95c3d37
fix(run.go): use a non-blocking channel receive
...
continuous-integration/drone/push Build is passing
adding the started channel and receiving in a blocking fashion meant the
program flow never got to blocking on the quit channel after setting up
signal intercepts. this commit turns the blocking receive on `started`
to a non-blocking one.
2023-05-03 03:03:06 +02:00
d5ed25f1f1
go: add a TODO [skip ci]
2023-05-03 02:38:35 +02:00
c4d0cb209b
go: add settings struct
...
continuous-integration/drone/push Build is passing
* let the settings struct be the single source of truth
* rm app fields that are covered by settings
* pass around a pointer to settings instead of config
* consolidate config+flags into settings on start-up
* update tests
* rm empty settings.go file
fixes #4
2023-05-03 02:18:29 +02:00
9ab2d0ae0b
go: handle host+port combinations,shutdown better
...
continuous-integration/drone Build is passing
continuous-integration/drone/push Build is passing
* add log messages telling the user what went wrong if the app fails to
start
* improve existing log messages
* cleanup: close channels when exiting
* cleanup: stop listening for signals when exiting
2023-05-02 00:04:04 +02:00
3439ec7c2a
app: set devel mode earlier
continuous-integration/drone/push Build is passing
2023-05-01 15:47:39 +02:00
269c63c661
log: return logger on Init
continuous-integration/drone/push Build is passing
2023-04-28 22:54:09 +02:00
b5373602ba
run.go: add license flag
continuous-integration/drone/push Build is passing
2023-04-19 23:36:12 +02:00
dc0ce9b27a
chore: clean up run.go
continuous-integration/drone/push Build is passing
2023-04-19 21:41:51 +02:00
733f232c49
banner: add moar bling ✨
continuous-integration/drone/push Build is passing
2023-04-19 21:22:00 +02:00
aadb409606
go: fully switch to slogging
continuous-integration/drone/push Build is passing
2023-04-19 05:30:52 +02:00
f129606b8f
add bulk changes
...
continuous-integration/drone/push Build is passing
* add handlers for signin,singup,logout...
* introduce ent ORM and add user schema
* add live mode, devel mode to selectively turn on features via
config/flags
* add templates, handle embedding moar smarter:
* live mode uses live folder structure, else embedded templates are
used
* start using tailwindcss to style stuff
* add development goodies for hot-reloading (browser-sync - bs.js)
* pimp-up config.dhall with actual custom config Type (enables remote
schema and local values only as needed)
* add justfile (alternative to makefile for process automation)
2023-04-13 00:07:08 +02:00
5cfad662fc
go: make StartupSettings a method
2023-03-22 23:04:57 +01:00
c945c9fcb7
go: add a method to setup routes
2023-03-22 23:03:21 +01:00
f728a9750f
go: handle SIGINT gracefully
2023-03-22 22:56:25 +01:00
6194f36d73
go: add app struct bearing e,logger; own startup
2023-03-22 22:13:23 +01:00
b78fc9964d
add application that handles basic config
2023-03-19 22:03:12 +01:00