diff --git a/Makefile b/Makefile index 86eacf4..4a94637 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ BIN := listmonk +STATIC := config.toml.sample schema.sql queries.sql public email-templates frontend/my/build:/frontend HASH := $(shell git rev-parse --short HEAD) COMMIT_DATE := $(shell git show -s --format=%ci ${HASH}) @@ -6,7 +7,11 @@ BUILD_DATE := $(shell date '+%Y-%m-%d %H:%M:%S') VERSION := ${HASH} (${COMMIT_DATE}) build: - go build -o ${BIN} -ldflags="-X 'main.buildVersion=${VERSION}' -X 'main.buildDate=${BUILD_DATE}'" + go build -o ${BIN} -ldflags="-s -w -X 'main.buildVersion=${VERSION}' -X 'main.buildDate=${BUILD_DATE}'" + stuffbin -a stuff -in ${BIN} -out ${BIN} ${STATIC} + +deps: + go get -u github.com/knadh/stuffbin/... test: go test diff --git a/config.toml.sample b/config.toml.sample index 337c6d5..12472f7 100644 --- a/config.toml.sample +++ b/config.toml.sample @@ -4,7 +4,17 @@ address = "0.0.0.0:9000" # Public root URL of the listmonk installation that'll be used # in the messages for linking to images, unsubscribe page etc. -root = "http://listmonk.mysite.com" +root = "https://listmonk.mysite.com" + +# (Optional) full URL to the static logo to be displayed on +# user facing view such as the unsubscription page. +# eg: https://mysite.com/images/logo.svg +logo_url = "" + +# (Optional) full URL to the static favicon to be displayed on +# user facing view such as the unsubscription page. +# eg: https://mysite.com/images/favicon.png +favicon_url = "" # The default 'from' e-mail for outgoing e-mail campaigns. from_email = "listmonk " @@ -22,9 +32,6 @@ upload_path = "uploads" # under this URI, for instance, list.yoursite.com/uploads. upload_uri = "/uploads" -# Directory where the app's static assets are stored (index.html, ./static etc.) -asset_path = "frontend/my/build" - # Maximum concurrent workers that will attempt to send messages # simultaneously. This should depend on the number of CPUs the # machine has and also the number of simultaenous e-mails the diff --git a/templates/base.html b/email-templates/base.html similarity index 100% rename from templates/base.html rename to email-templates/base.html diff --git a/templates/campaign-status.html b/email-templates/campaign-status.html similarity index 100% rename from templates/campaign-status.html rename to email-templates/campaign-status.html diff --git a/templates/default.tpl b/email-templates/default.tpl similarity index 100% rename from templates/default.tpl rename to email-templates/default.tpl diff --git a/templates/import-status.html b/email-templates/import-status.html similarity index 100% rename from templates/import-status.html rename to email-templates/import-status.html diff --git a/frontend/my/package.json b/frontend/my/package.json index 7c90fe1..d39b1b0 100644 --- a/frontend/my/package.json +++ b/frontend/my/package.json @@ -16,15 +16,9 @@ "react-router-dom": "^4.3.1", "react-scripts": "1.1.4" }, - "xxscripts": { - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test --env=jsdom", - "eject": "react-scripts eject" - }, "scripts": { "start": "react-app-rewired start", - "build": "react-app-rewired build", + "build": "GENERATE_SOURCEMAP=false PUBLIC_URL=/frontend/ react-app-rewired build", "test": "react-app-rewired test --env=jsdom", "eject": "react-scripts eject" }, diff --git a/frontend/my/public/index.html b/frontend/my/public/index.html index 2288373..c2f23fc 100644 --- a/frontend/my/public/index.html +++ b/frontend/my/public/index.html @@ -4,11 +4,11 @@ - + - %PUBLIC_URL% + listmonk