Šioje repositorijoje galite rasti VU Studentų atstovybės puslapio kodą. Daugiau apie VU SA.
Daugiau skaitykite diskusijoje, čia.
Kaip susikurti lokalią erdvę, parodyta sekcijoje For start of development
Keletas taisyklių:
- Commit'ai, branch'ai - tik anglų kalba. Visa kita gali būti pasirinkta kalba - lietuvių arba anglų
- Jeigu yra noro diegti naują funkciją, būtinai turi įvykti diskusija, projektas ar issue, ir sutarta, kad tokia funkcija bus įdiegiama. Kitu atveju - visiškai negarantuoju, kad funkcija, pakeitimas bus įtrauktas į main šaką.
Puslapį palaiko Justinas Kavoliūnas nuo 2018 m. rugsėjo, iki tol - Mindaugas Taločka.
This is the repo for vusa.lt website. Everyone is welcome to help. :) More about VU SA. Also, read more on the vusa.lt repository: here 😄
The easiest method to develop. You have to be able to run Docker and PHP (temporarily) on your machine.
Steps:
- Clone the repository
- Install PHP8 (used only for comoposer and sail setup)
- Download composer, run
composer update
- After updating the repository, run
./vendor/bin/sail up -d
- Other setup steps:
- Copy
.env.example
and rename it to.env
./vendor/bin/sail composer update
./vendor/bin/sail artisan key:generate
./vendor/bin/sail npm update
./vendor/bin/sail npm run dev
./vendor/bin/sail artisan storage:link
- Go to http://localhost:8080 and create database manually, with name
vusa
, collationutf8mb4_lithuanian_ci
. ./vendor/bin/sail artisan migrate:fresh
- Copy
For optimal installation you'll also need the SQL file of database records. Please contact @justinaskav for this. I haven't had the time for any seeders.
More instructions on Laravel Sail
There still should be some prerequisites missing, so I'll update this in time.
UPDATE: The repo is on PHP 8.1, so some steps may not work. If you don't want to run docker, then I'll advise to substitute php8.0
with php8.1
.
For Windows computers, WSL is a good and quite a simple solution to use in this case. Installation guide
Prerequisites:
- PHP 8.0 install. Installation guide
- After PHP install, install PHP modules:
sudo apt install php8.0-curl php8.0-zip php8.0-mbstring php8.0-dom php8.0-sqlite3 php8.0-gd
- Install Composer v2. Installation guide.
- Install Node.js. On some computers, simple
sudo apt install nodejs
could work (check version, if below v14 and on Ubuntu, use this guide
Laravel and vusa.lt installation:
- Clone the directory with
git
:git clone https://github.com/vu-sa/vusa.lt.git
will work. - Create a copy of the file
./.env.example
and name it.env
- Run
php composer install
orcomposer install
, depending if the Composer is global or not - Run
php artisan key:generate
- Setup a database (recommended:
touch database/database.sqlite
) - Run
npm install && npm run dev
- Run
php artisan migrate:fresh --seed
- Run
php artisan storage:link
- Modify your hosts file to direct vusa.testas to 127.0.0.1
php artisan serve
- Open vusa.testas:8000
- Modify your host file to direct if.vusa.testas to 127.0.0.1. Only if domain is supported for unit site development ATM.
- Open if.vusa.testas:8000. Make sure that the server (
php artisan serve
) is on.
Apache2 is the recommended server for development, since it may resemble the production environment more.
How to setup:
- Make sure
apache2
is installed (sudo apt install apache2
) - Create a
vusa.conf
file with this body.
<VirtualHost *:80>
ServerName vusa.testas
ServerAlias www.vusa.testas if.vusa.testas
ServerAdmin webmaster@localhost
DocumentRoot [INSERT YOUR DOCUMENT ROOT, something like .../vusa.lt/public]
UseCanonicalName OFF
<Directory [INSERT YOUR DOCUMENT ROOT DIRECTORY, something like .../vusa.lt/]>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
- Modify hosts file to have a IPv6 loopback:
127.0.0.1 vusa.testas
::1 vusa.testas
127.0.0.1 if.vusa.testas
::1 if.vusa.testas
- Give the
www-data
user your user group permissions, likesudo usermod -a -G justinas www-data
(or fix the permissions yourself, however you want). - Give group write permissions to laravel.log
sudo chmod g+w storage/logs/laravel.log
- Run
sudo a2enmod rewrite && sudo service apache2 restart
If any questions arise how to setup for development, please write to it@vusa.lt 😄