Skip to content

Latest commit

 

History

History
74 lines (47 loc) · 2.68 KB

README.md

File metadata and controls

74 lines (47 loc) · 2.68 KB

Pasteybin

Kotlin Version Ktor Version Flutter Version build status PR's Welcome

Open Source Pastebin alternative.

Installation

To run the application you can run the docker image with command

The user interface runs on port 8081 and can be accessed through http://localhost:8081 The api server runs on port 8080

docker run -p "8081:8081" -p "8080:8080" -v $(pwd):/db:rw --name pasteybin neuman314/pasteybin

You can also specify api host if hosted somewhere other than localhost:8080

docker run -e 'API_HOST=raspberrypi:8080' -e 'CORS_HOSTS=raspberrypi:8080,raspberrypi:8081' -p "8081:8081" -p "8080:8080" -v $(pwd):/db:rw --name pasteybin neuman314/pasteybin

If you navigate to http://localhost:8081/ to use the application.

Cors Configuration

Allowed Cors can be configured using the CORS_HOSTS and CORS_SCHEMES environment variables.

When the CORS_HOSTS environment variable is not set, it defautls to a wildcard host * The default CORS_HOSTS when running in docker is localhost:8080 and localhost:8081 Default CORS_SCHEMES is http and ws. If using TLS, can be set to https and wss

Running from source

Clone the repository.

git clone [email protected]:Neuman968/pasteybin.git

Note: Java and Flutter are required in order to build the project.

The flutter application is located in the ui folder.

The Kotlin server application is located in the api folder.

There is a build.sh utility that allows for building the docker image using gradle jib. Flutter is compiled as a web application and the static html and javascript is hosted by ktor on port 8081. The REST and websocket endpoints are hosted on port 8080.

Contributing

Contributions are welcome, including feature requests, pull requests, etc.

Technologies used in this project