This is url shortener application is similar to bit.ly
- Laravel 7.0+
- PHP 7.4
composer install- create
.envfile php artisan key:generatephp artisan migratephp artisan db:seedphp artisan serve
<VirtualHost *:80>
DocumentRoot /srv/http/short/public
ServerAdmin webmaster@localhost
ServerName short.test
<Directory /srv/http/short/public>
DirectoryIndex index.php
AllowOverride All
Options FollowSymlinks
Require all granted
</Directory>
ErrorLog /var/log/httpd/short.test-error_log
CustomLog /var/log/httpd/short.test-access_log common
</VirtualHost>
This app can run inside docker with official support
docker-compose up -ddocker-compose exec short-app php artisan migratedocker-compose exec short-app php artisan db:seeddocker build . -t supanadit/short-url:1.0.2docker-compose -f docker-compose.dev.yml up -ddocker-compose -f docker-compose.dev.yml exec -w /srv short composer install # Composer Installdocker-compose -f docker-compose.dev.yml exec -w /srv short php artisan key:generate # Generate Keydocker-compose -f docker-compose.dev.yml exec -w /srv short php artisan migratedocker-compose -f docker-compose.dev.yml exec -w /srv short php artisan db:seeddocker-compose -f docker-compose.dev.yml downdocker-compose -f docker-compose.dev.yml exec -w /srv short php artisan config:cachedocker-compose -f docker-compose.dev.yml buildRun this script sudo chown -R 1001:1001 mysql
Because we used Bitnami distribution version of MySQL, so we need to change the permission of mysql folder, since it also described in docker page of bitnami
If you want to use forgot password feature, you must provide your email and password at .env
Copyright 2020 Supan Adit Pratama
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.