Go to file
Kailash Nadh 7eeb813f19 Add embedding of static assets for standalone dist binary
This is a big commit that involves drastic changes to how static assets
(.sql and template files, the whole frontend bundle) are handled.
listmonk distribution should be a self-contained single binary
distribution, hence all static assets should be bundled. After
evaluating several solutions, srtkkou/zgok seemed like the best bet but
it lacked several fundamental features, namely the ability to fall back
to the local filesystem in the absence of embedded assets (for instance,
in the dev mode). Moreover, there was a lot of room for cleanup.

After a PR went unanswered, github.com/knadh/stuffbin was created. Just
like zgok, this enables arbitrary files and assets to be embedded into a
compiled Go binary that can be read during runtime. These changes
followed:

- Compress and embed all static files into the binary during
  the build (Makefile) to make it standalone and distributable
- Refactor static paths (/public/* for public facing assets,
  /frontend/* for the frontend app's assets)
- Add 'logo_url' to config
- Remove 'assets_path' from config
- Tweak yarn build to not produce symbol maps and override
  the default /static (%PUBLIC_URL%) path to /frontend
2019-01-03 16:48:47 +05:30
email-templates Add embedding of static assets for standalone dist binary 2019-01-03 16:48:47 +05:30
frontend Add embedding of static assets for standalone dist binary 2019-01-03 16:48:47 +05:30
manager Refactor TrackLink template function to accept backticks 2018-12-19 12:28:52 +05:30
messenger Add admin e-mail notifications. 2018-11-28 13:29:57 +05:30
models Refactor SQL schema and add missing indexes 2018-12-26 15:31:30 +05:30
public Add embedding of static assets for standalone dist binary 2019-01-03 16:48:47 +05:30
subimporter Add admin e-mail notifications. 2018-11-28 13:29:57 +05:30
.gitignore Ignore yarn.lock 2018-10-25 19:23:30 +05:30
Makefile Add embedding of static assets for standalone dist binary 2019-01-03 16:48:47 +05:30
admin.go Rename 'runner.Runner' to 'manager.Manager' 2018-12-19 12:03:13 +05:30
campaigns.go Rename 'runner.Runner' to 'manager.Manager' 2018-12-19 12:03:13 +05:30
config.toml.sample Add embedding of static assets for standalone dist binary 2019-01-03 16:48:47 +05:30
handlers.go Add embedding of static assets for standalone dist binary 2019-01-03 16:48:47 +05:30
import.go Add admin e-mail notifications. 2018-11-28 13:29:57 +05:30
install.go Add embedding of static assets for standalone dist binary 2019-01-03 16:48:47 +05:30
lists.go Fresh start 2018-10-25 19:21:47 +05:30
main.go Add embedding of static assets for standalone dist binary 2019-01-03 16:48:47 +05:30
manager_db.go Rename 'runner.Runner' to 'manager.Manager' 2018-12-19 12:03:13 +05:30
media.go Fresh start 2018-10-25 19:21:47 +05:30
notifications.go Add admin e-mail notifications. 2018-11-28 13:29:57 +05:30
public.go Add embedding of static assets for standalone dist binary 2019-01-03 16:48:47 +05:30
queries.go Add bulk subscriber querying, segmentation, and management features 2018-12-18 10:54:55 +05:30
queries.sql Refactor get-campaigns query 2018-12-20 10:52:13 +05:30
schema.sql Refactor SQL schema and add missing indexes 2018-12-26 15:31:30 +05:30
stats.sql Add support for campaign view tracking with {{ TrackView }} pixel tag 2018-11-02 13:20:32 +05:30
subscribers.go Add bulk subscriber querying, segmentation, and management features 2018-12-18 10:54:55 +05:30
templates.go Remove redundant error wrapper 2018-12-26 15:38:08 +05:30
users.go Fresh start 2018-10-25 19:21:47 +05:30
utils.go Add bulk subscriber querying, segmentation, and management features 2018-12-18 10:54:55 +05:30