Browse Source

Updated build process

pull/52/head
Atridad Lahiji 1 month ago
parent
commit
3e96af0f79
  1. 4
      .env.example
  2. 3
      .gitignore
  3. 37
      README.md
  4. 24
      build.sh
  5. BIN
      eleutheriapay-2.0.0-RC1-darwin-amd64
  6. 2
      main.go

4
.env.example

@ -14,7 +14,7 @@ BACK_LINK=""
EMAIL_LINK=""
GIT_LINK=""
GITHUB_LINK=""
GITLAB_LINK="https://git.lahijiapps.dev/atrilahiji/eleutheriapay"
GITLAB_LINK="https://git.atrilahiji.dev/atrilahiji/eleutheriapay"
FACEBOOK_LINK=""
TWITTER_LINK=""
INSTAGRAM_LINK=""
@ -24,6 +24,6 @@ TEXT_COLOR="#2c3e50"
BUTTON_COLOR="#2980b9"
TOP_NAV_COLOR="#16a085"
BG_COLOR_DARK="#2c3e50"
TEST_COLOR_DARK="#ffffff"
TEXT_COLOR_DARK="#ffffff"
BUTTON_COLOR_DARK="#2980b9"
TOP_NAV_COLOR_DARK="#16a085"

3
.gitignore

@ -1 +1,2 @@
.env
.env
bin/

37
README.md

@ -22,18 +22,14 @@ DEMO: https://eleutheriapaydemo.atrilahiji.dev
```
https://git.atrilahiji.dev/atrilahiji/EleutheriaPay/releases/latest
```
## Run the install script
```
./install.sh
```
## Edit the .env file that is created (the parameters are outlined below)
## Edit the default .env file that is created (the parameters are outlined below)
IMPORTANT: Please ensure your stripe publishable and secret keys are set before running EleutheriaPay.
## Run the start script
EleutheriaPay will run a server on localhost:8080. Please use this port when configuring a reverse proxy such as NGINX.
## Run the binary
EleutheriaPay will run a server on localhost:3000. Please use this port when configuring a reverse proxy such as NGINX.
```
npm run start
./eleutheriapay-${VERSION}-${GOOS}-${GOARCH}
```
# Build from source
@ -74,23 +70,16 @@ FACEBOOK_LINK
TWITTER_LINK
INSTAGRAM_LINK
LINKEDIN_LINK
```
## Customizing CSS
CSS can be modified by using the styles.css file in the frontend/public/css directory. The default looks like this:
```
:root {
--bg-color: #ffffff;
--text-color: #2c3e50;
--button-color: #2980b9;
--top-nav-color: #16a085;
}
[data-theme="dark"] {
--bg-color: #2c3e50;
--text-color: #ffffff;
--button-color: #2980b9;
--top-nav-color: #16a085;
}
CSS Configuration:
BG_COLOR: Light theme background color.
TEXT_COLOR: Light theme text color.
BUTTON_COLOR: Light theme button color.
TOP_NAV_COLOR: Light theme top nav color.
BG_COLOR_DARK: Dark theme background color.
TEXT_COLOR_DARK: Dark theme text color.
BUTTON_COLOR_DARK: Dark theme button color.
TOP_NAV_COLOR_DARK: Dark theme top nav color.
```
# Theme configuration

24
build.sh

@ -7,8 +7,26 @@ cd ./frontend
npm install
npm run build
export OLD_GOOS=$(go env GOOS)
export OLD_GOARCH=$(go env GOARCH)
# build backend
cd ..
go build -o eleutheriapay-$VERSION-$(go env GOHOSTOS)-$(go env GOARCH)
$(go env GOPATH)/bin/rice append --exec eleutheriapay-$VERSION-$(go env GOHOSTOS)-$(go env GOARCH)
chmod +x eleutheriapay-$VERSION-$(go env GOHOSTOS)-$(go env GOARCH)
mkdir bin
# buid for macos intel 64-bit
export GOOS=darwin
export GOARCH=amd64
mkdir bin/$(go env GOOS)-$(go env GOARCH)
cp .env.example ./bin/$(go env GOOS)-$(go env GOARCH)/.env
go build -o ./bin/$(go env GOOS)-$(go env GOARCH)/eleutheriapay-$VERSION-$(go env GOOS)-$(go env GOARCH)
$(go env GOPATH)/bin/rice append --exec ./bin/$(go env GOOS)-$(go env GOARCH)/eleutheriapay-$VERSION-$(go env GOOS)-$(go env GOARCH)
chmod +x ./bin/$(go env GOOS)-$(go env GOARCH)/eleutheriapay-$VERSION-$(go env GOOS)-$(go env GOARCH)
# buid for macos intel 64-bit
export GOOS=linux
export GOARCH=amd64
mkdir bin/$(go env GOOS)-$(go env GOARCH)
cp .env.example ./bin/$(go env GOOS)-$(go env GOARCH)/.env
go build -o ./bin/$(go env GOOS)-$(go env GOARCH)/eleutheriapay-$VERSION-$(go env GOOS)-$(go env GOARCH)
$(go env GOPATH)/bin/rice append --exec ./bin/$(go env GOOS)-$(go env GOARCH)/eleutheriapay-$VERSION-$(go env GOOS)-$(go env GOARCH)
chmod +x ./bin/$(go env GOOS)-$(go env GOARCH)/eleutheriapay-$VERSION-$(go env GOOS)-$(go env GOARCH)

BIN
eleutheriapay-2.0.0-RC1-darwin-amd64

2
main.go

@ -66,7 +66,7 @@ func configHandler(w http.ResponseWriter, r *http.Request) {
os.Getenv("BUTTON_COLOR"),
os.Getenv("TOP_NAV_COLOR"),
os.Getenv("BG_COLOR_DARK"),
os.Getenv("TEST_COLOR_DARK"),
os.Getenv("TEXT_COLOR_DARK"),
os.Getenv("BUTTON_COLOR_DARK"),
os.Getenv("TOP_NAV_COLOR_DARK"),
}

Loading…
Cancel
Save