Giter Site home page Giter Site logo

vusa.lt's Introduction

Š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.

In English

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 😄


For start of development

Laravel Sail, i.e. Docker (Recommended!)

The easiest method to develop. You have to be able to run Docker and PHP (temporarily) on your machine.

Steps:

  1. Clone the repository
  2. Install PHP8 (used only for comoposer and sail setup)
  3. Download composer, run composer update
  4. After updating the repository, run ./vendor/bin/sail up -d
  5. Other setup steps:
    1. Copy .env.example and rename it to .env
    2. ./vendor/bin/sail composer update
    3. ./vendor/bin/sail artisan key:generate
    4. ./vendor/bin/sail npm update
    5. ./vendor/bin/sail npm run dev
    6. ./vendor/bin/sail artisan storage:link
    7. Go to http://localhost:8080 and create database manually, with name vusa, collation utf8mb4_lithuanian_ci.
    8. ./vendor/bin/sail artisan migrate:fresh

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

On linux

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:

  1. Clone the directory with git: git clone https://github.com/vu-sa/vusa.lt.git will work.
  2. Create a copy of the file ./.env.example and name it .env
  3. Run php composer install or composer install, depending if the Composer is global or not
  4. Run php artisan key:generate
  5. Setup a database (recommended: touch database/database.sqlite)
  6. Run npm install && npm run dev
  7. Run php artisan migrate:fresh --seed
  8. Run php artisan storage:link
  9. Modify your hosts file to direct vusa.testas to 127.0.0.1
  10. php artisan serve
  11. Open vusa.testas:8000

For unit (padalinių) site development

  1. Modify your host file to direct if.vusa.testas to 127.0.0.1. Only if domain is supported for unit site development ATM.
  2. Open if.vusa.testas:8000. Make sure that the server (php artisan serve) is on.

Apache2 configuration

Apache2 is the recommended server for development, since it may resemble the production environment more.

How to setup:

  1. Make sure apache2 is installed (sudo apt install apache2)
  2. 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>
  1. 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
  1. Give the www-data user your user group permissions, like sudo usermod -a -G justinas www-data (or fix the permissions yourself, however you want).
  2. Give group write permissions to laravel.log sudo chmod g+w storage/logs/laravel.log
  3. Run sudo a2enmod rewrite && sudo service apache2 restart

If any questions arise how to setup for development, please write to [email protected] 😄

vusa.lt's People

Contributors

justinaskav avatar gustaz avatar dependabot[bot] avatar mrghosti3 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.