🚡 A modern, minimalist, and lightweight URL shortener.
Polr is an intrepid, self-hostable open-source link shortening web application with a robust API. It allows you to host your own URL shortener, to brand your URLs, and to gain control over your data. Polr is especially easy to use, and provides a modern, themable feel.
Getting Started - API Documentation - Contributing - Bugs - IRC
The project is setup using docker, so running it for development is fairly simple:
- Copy docker-compose.yml.dist into docker-compose.yml
- Run
docker-compose build
thendocker-compose up -d
- Add the following line in
/etc/hosts
file of the host OS127.0.0.1 fbk.st.test
If you're using volume mounting for coding, then for the first time, and also whenever a new composer dependency is
added in composer.json manually, you must run composer install
inside docker. The reason for this is that docker does
not mount the volume while building the image. So when the volume is mounted on docker run, then the directory
/var/www/html
will be overwritten and the changes in /var/www/html/vendor
directory will be lost. To overcome this
issue while benefiting from volume mounting, perform the following extra steps whenever there's a change in composer
dependencies:
- Run
docker-compose exec web sh
- When inside docker, run
php composer.phar install
After the setup, the app should be accessible on https://fbk.st.test.
Polr is written in PHP and Lumen, using MySQL as its primary database.
- To get started with Polr on your server, check out the installation guide. You can clone this repository, or download a release.
- To get started with the Polr API, check out the API guide.
Installation TL;DR: clone or download this repository, set document root to public/
, create MySQL database, go to yoursite.com/setup
and follow instructions.
To test out the demo, head to demo.polr.me and use the following credentials:
- Username:
demo-admin
- Password:
demo-admin
Upgrading from 1.x:
There are breaking changes between 2.x and 1.x; it is not yet possible to automatically upgrade to 2.x.
Upgrading from 2.x:
- Back up your database and files
- Update by using
git pull
or downloading a release - Run
composer install --no-dev -o
to ensure dependencies are up to date - Migrate with
php artisan migrate
to ensure database structure is up to date
- Safari - Polr.safariextension
Polr uses Semantic Versioning
Copyright (C) 2013-2017 Chaoyi Zha
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.