Giter Club home page Giter Club logo

ajutam's Introduction

Ajutam - Aplicatie management voluntari

Getting started

Installing

Manual

Install the LAMP Packages

The full documentation can be found here: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-ubuntu-18-04

Install the PHP prerequisite modules (if not installed)
sudo apt install php-cli
sudo apt install composer

sudo apt install php7.2-mbstring
sudo apt install php7.2-simplexml
Install nodejs (if not yet installed)
sudo apt install nodejs
sudo apt install npm
Create the MYSQL database and user

Connect to the MYSQL server with your favorite tool and run:

CREATE DATABASE laravel;

GRANT ALL PRIVILEGES ON *.* TO 'Some username here'@'localhost' IDENTIFIED BY 'Your Password here'; 
Install and configure NGROK (only necesarry if you wanna skip using a self signed cert)

https://dashboard.ngrok.com/get-started and follow the steps listed here.

Register a Facebook application for testing
  • make a note of the appid and appsecret
Clone the gibhub repo with the solution to your machine
git clone https://github.com/gabibora/ajutam.git

cd ajutam
Provision dependencies
composer install
Create the .env file

Create a copy of the .env.sample file and call it .env Update the following entries to match your env:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=[dbname]
DB_USERNAME=[dbuser]
DB_PASSWORD=[dbpassword]
Run artisan to provision stuff
php artisan key:generate

php artisan migrate --seed

php artisan passport:install
Install global JS packages
sudo npm install --global cross-env
Install the local JS packages
npm install
Build the app
npm run dev 
Test that everything is running
php artisan serve 

In a different tab:

./ngrok http 8000

Browse to https://localhost:8000 and you should see the application

Browse to the URL indicated by ngrok and you should see the application and be able to login.

Set the admin role for your test user

Connect to the MYSQL server with your favorite tool and run:

select * from users; 

make a not of the ID of the user you want to set as admin

UPDATE laravel.model_has_roles set role_id = 1 where model_id = [substitute with your user id];

Docker

docker-compose up -d

It might take a few minutes until it installs all dependencies and boots up the development servers (laravel and webpack). You can check the output using

docker-compose logs laravel

Run database migration and seed within Docker container

# Get laravel docker container ID from containers list
docker ps

docker exec -it <container ID> bash
# Where <container ID> is the "laravel" container ID (first 4 characters should be enough)

php artisan migrate --seed
php artisan passport:install
# exit

npm commands are also supported:

docker exec -it <container ID> npm run watch 
# Where <container ID> is the "laravel" container ID
...

You can stop the containers with:

docker-compose stop

or

docker-compose down # destroys the containers, but keeps the db and node_modules

Running the tests

  • Tests system is under development

Deployment and/or CI/CD

This project uses Envoy for deployment, and GitLab CI/CD. Please check Envoy.blade.php and .gitlab-ci.yml for more detail.

Built with

  • Laravel - The PHP Framework For Web Artisans
  • VueJS - The Progressive JavaScript Framework
  • Element - A Vue 2.0 based component library for developers, designers and product managers
  • Vue Admin Template - A minimal vue admin template with Element UI

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

ajutam's People

Contributors

gabibora avatar ksdaniel avatar andreiuifi avatar andreistefanie avatar

Forkers

danichim

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.