Commit Graph

50 Commits

Author SHA1 Message Date
7c8650019e
go: add a way to reduce printing
All checks were successful
continuous-integration/drone/push Build is passing
2023-08-13 18:06:24 +02:00
9b4aa6e370
go: mv flags to flag.go
All checks were successful
continuous-integration/drone/push Build is passing
2023-08-13 17:00:46 +02:00
600ef9d445
go: add a way to display upcoming db migrations
All checks were successful
continuous-integration/drone/push Build is passing
2023-08-13 16:57:19 +02:00
096b486dd8
go(run.go): add comment [skip ci] 2023-08-13 16:48:39 +02:00
afcd7c4198
go(run.go): consolidate flag names
All checks were successful
continuous-integration/drone/push Build is passing
2023-08-12 14:57:56 +02:00
1106359a3e
go(app/server.go): rename func
All checks were successful
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
All checks were successful
continuous-integration/drone/push Build is passing
2023-08-10 19:06:13 +02:00
9ac8810f67
go: change how logger is initialised
All checks were successful
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
All checks were successful
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
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-19 21:51:05 +02:00
7cf26a73e3
go: add importFlag
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-19 18:25:46 +02:00
leo
32aa8d8852
go: add+enable compression middleware
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-31 22:42:50 +02:00
leo
ff68a7dbe3
go: fix port default,flag handling
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-23 16:37:33 +02:00
leo
9972551239
run: improve config load err message
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-21 18:59:12 +02:00
leo
6ce05ea74d
feat: add initial admin user creation
All checks were successful
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
leo
744090aa9a
enable erasing ENVs
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-21 16:00:22 +02:00
leo
3a2f85f683
feat: add license headers (+spdx id)
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-20 20:15:57 +02:00
leo
ac7c1ae431
add TODOs [skip ci] 2023-05-17 20:55:09 +02:00
leo
72723d951d
go(refactor): clean up run.go
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-17 20:40:24 +02:00
leo
4de0576c26
go: add some more startup checks for DB
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-17 13:35:13 +02:00
leo
e5980b15e5
update TODOs [skip ci] 2023-05-17 13:21:14 +02:00
leo
3a86905b14
config: rename LoadConfig to Load
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-13 19:44:32 +02:00
leo
1fb7479d8e
slogger: rename Logger to Slogger
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-11 17:06:20 +02:00
leo
355f09bf5a
set embeds early to prevent nil pointer derefs
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-11 04:40:10 +02:00
leo
a879704535
go: partially rework how slogging works
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-09 17:35:00 +02:00
leo
0a34bca1c1
go: allow choosing db type, setting connstr
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-05 23:10:56 +02:00
leo
f1bb52c58f
go: add a setting val for whether db is set up
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-05 22:58:13 +02:00
leo
b1ab686493
go: add db module for preps/checks
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-05 22:52:59 +02:00
leo
dfdcc77737
conf: add pretty printing,raw conf, conf tests
All checks were successful
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
leo
746eb82f67
go: make sure flags are properly checked
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-04 21:28:30 +02:00
leo
672132a109
go: die even more reliably on error
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 05:58:09 +02:00
leo
1359750c97
go: handle long running shutdowns better
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 04:58:47 +02:00
leo
6937eb7a80
go: explicitly close chan
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 04:57:04 +02:00
leo
ed14e45969
go: add more tests (+return instead of exit)
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 04:26:42 +02:00
leo
1ba95c3d37
fix(run.go): use a non-blocking channel receive
All checks were successful
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
leo
d5ed25f1f1
go: add a TODO [skip ci] 2023-05-03 02:38:35 +02:00
leo
c4d0cb209b
go: add settings struct
All checks were successful
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
leo
9ab2d0ae0b
go: handle host+port combinations,shutdown better
All checks were successful
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
leo
3439ec7c2a
app: set devel mode earlier
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-01 15:47:39 +02:00
leo
269c63c661
log: return logger on Init
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-28 22:54:09 +02:00
leo
b5373602ba
run.go: add license flag
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-19 23:36:12 +02:00
leo
dc0ce9b27a
chore: clean up run.go
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-19 21:41:51 +02:00
leo
733f232c49
banner: add moar bling
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-19 21:22:00 +02:00
leo
aadb409606
go: fully switch to slogging
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-19 05:30:52 +02:00
leo
f129606b8f
add bulk changes
All checks were successful
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
leo
5cfad662fc
go: make StartupSettings a method 2023-03-22 23:04:57 +01:00
leo
c945c9fcb7
go: add a method to setup routes 2023-03-22 23:03:21 +01:00
leo
f728a9750f
go: handle SIGINT gracefully 2023-03-22 22:56:25 +01:00
leo
6194f36d73
go: add app struct bearing e,logger; own startup 2023-03-22 22:13:23 +01:00
leo
b78fc9964d
add application that handles basic config 2023-03-19 22:03:12 +01:00