mirror of https://github.com/JustKato/FreePad.git
Updated visuals
+ New banner * fixed .env missing variable * Build script now builds to all platforms + ReadMe instructions for running
This commit is contained in:
parent
73b3286e33
commit
725bc4222b
|
@ -17,4 +17,8 @@ API_BAN_LIMIT=300
|
|||
DEV_MODE=0
|
||||
|
||||
# Maximum file storage age in minutes, set to -1 to disable
|
||||
CLEANUP_MAX_AGE=43200 # Default is a month
|
||||
CLEANUP_MAX_AGE=43200 # Default is a month
|
||||
|
||||
# Maximum pad file lenght, this is in characters, a character is one byte.
|
||||
# Default: 524288 ( 500kb )
|
||||
MAXIMUM_PAD_SIZE=524288
|
64
README.md
64
README.md
|
@ -30,4 +30,66 @@ The `.env` file contains all of the available options and you should use it to c
|
|||
|
||||
If you need any help with any setting you can always open an issue over on github and get help from me.
|
||||
|
||||
If you are barely getting started with hosting your own services, or even Sys admin stuff in general or writing code my suggestion is to just copy `.env` and leave it as is until you get it running with the defaults running fine, afterwards you can play with it a little and who knows, maybe even get to learn something!
|
||||
If you are barely getting started with hosting your own services, or even Sys admin stuff in general or writing code my suggestion is to just copy `.env` and leave it as is until you get it running with the defaults running fine, afterwards you can play with it a little and who knows, maybe even get to learn something!
|
||||
|
||||
![Gopher](static/img/banner_how_to_run.png)
|
||||
|
||||
## Docker `(Recommended)`
|
||||
```bash
|
||||
# Get into a directory to run this
|
||||
mkdir ~/freepad && cd freepad
|
||||
|
||||
# Copy the latest .env and docker-compose.example.yaml files
|
||||
wget -O docker-compose.yaml https://raw.githubusercontent.com/JustKato/FreePad/master/docker-compose.example.yaml
|
||||
wget -O .env https://raw.githubusercontent.com/JustKato/FreePad/master/.env.example
|
||||
|
||||
# Edit your docker-compose.yaml and change the DOMAIN_BASE environment variable
|
||||
vim docker-compose.yaml
|
||||
|
||||
# Edit your .env file and change the variables to your liking
|
||||
vim .env
|
||||
|
||||
# Run the container
|
||||
docker-compose up
|
||||
# Run the container in the background
|
||||
docker-compose up -d
|
||||
```
|
||||
## Distribution
|
||||
[Downloads here](https://github.com/JustKato/FreePad/releases)
|
||||
```bash
|
||||
# Get into a directory to run this
|
||||
mkdir ~/freepad && cd freepad
|
||||
|
||||
# Get the latest distribution from https://github.com/JustKato/FreePad/releases
|
||||
wget -O release.zip https://github.com/JustKato/FreePad/releases/download/main/...
|
||||
|
||||
# Unzip the release
|
||||
unzip release.zip
|
||||
|
||||
# Edit the .env file
|
||||
vim ./.env
|
||||
|
||||
# Run the program
|
||||
./freepad
|
||||
```
|
||||
|
||||
## Building
|
||||
```bash
|
||||
# Clone th erepo
|
||||
git clone https://github.com/JustKato/FreePad.git ~/freepad
|
||||
|
||||
# Get into the directory
|
||||
cd ~/freepad
|
||||
|
||||
# Build using the script
|
||||
./build.sh
|
||||
|
||||
# Copy the environment variable
|
||||
cp .env dist/
|
||||
|
||||
# Go into the program's directory
|
||||
cd dist
|
||||
|
||||
# Run the program
|
||||
./freepad
|
||||
```
|
6
build.sh
6
build.sh
|
@ -2,7 +2,7 @@
|
|||
echo "Building FreePad...\n";
|
||||
|
||||
echo "Removing old build file...";
|
||||
rm dist/freepad 2> /dev/null || true
|
||||
rm dist/freepad* 2> /dev/null || true
|
||||
rm -r dist/static 2> /dev/null || true
|
||||
rm -r dist/templates 2> /dev/null || true
|
||||
rm dist/.env 2> /dev/null || true
|
||||
|
@ -10,6 +10,10 @@ rm dist/.env 2> /dev/null || true
|
|||
# Build
|
||||
echo "Building executable"
|
||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o ./dist/freepad .
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -o ./dist/freepad-arm64 .
|
||||
CGO_ENABLED=0 GOOS=windows go build -a -installsuffix cgo -o ./dist/freepad.exe .
|
||||
CGO_ENABLED=0 GOOS=darwin go build -a -installsuffix cgo -o ./dist/freepad-darwin .
|
||||
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -a -installsuffix cgo -o ./dist/freepad-darwin-64 .
|
||||
|
||||
echo "Copying templates"
|
||||
cp -r ./templates ./dist/templates
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 9.2 KiB |
Loading…
Reference in New Issue