A reddit-like imageboard.
- PHP >= 7.1.3
- Composer
- PDO PHP Extension + pdo_mysql
- Docker + docker-compose
- NPM
- Vue-cli
IMPORTANT: please make sure that your 192.168.1.0/29 network and 8080-8081 ports are not occupied by running applications.
git clone https://github.com/crimsonwrench/shelter.git
cd shelter/backend/src && composer install
docker-compose up -d
cp .env.example .env
php artisan key:generate
php artisan migrate && php artisan db:seed
php artisan passport:install
Example output:
Password grant client created successfully.
Client ID:2
Client secret:6IAw8faXHGaLxhfWaAqUWQEj1iK6oMsDgyzwiyR0
.env file:
PASSPORT_CLIENT_ID=
2
PASSPORT_CLIENT_SECRET=6IAw8faXHGaLxhfWaAqUWQEj1iK6oMsDgyzwiyR0
cd ../../frontend && npm i
npm run serve
Site will then be available at localhost:8080
By default, frontend is configured for development.
If you want to build it for production, comment proxy_...
lines with #
and uncomment try_files
line in location / { ... }
route in shelter/frontend/config/shelter.conf
Your route should be as following:
location / {
#proxy_pass http://192.168.0.102:8081; # npm server address
#proxy_http_version 1.1;
#proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection "Upgrade";
try_files $uri $uri/ /index.html;
}
docker-compose down && docker-compose build && docker compose up -d
npm run build
APP_DEBUG=false