Giter VIP home page Giter VIP logo

carpoolear_backend's Introduction

Carpoolear backend

Carpoolear es la primera aplicación argentina de Facebook que permite a los usuarios de dicha red social compartir viajes en automóvil con otros usuarios de su entorno.

Es una customización ad-hoc para Argentina de la filosofía carpooling, la cual consiste en compartir nuestros viajes en auto con otras personas de forma cotidiana. El carpooling es una práctica popular en Estados Unidos y Europa, donde se realiza de manera organizada para lograr aumentar el número de viajes compartidos y que estos sean concretados con otras personas además de nuestros vecinos y amigos.

Start coding

Clone repository (remember to make your own fork)

git clone https://github.com/STS-Rosario/carpoolear_backend.git

Install dependencies

composer install

Configure the database access in the .env file

cp .env.example .env

Generate laravel key

php artisan key:generate

Give read/write access to the storage folder

chmod -R ugo+rw storage/

Generate the database

php artisan migrate

You will need to use a local webserver and point it to the public folder

Happy coding!

Carpoolear on Docker

  1. Complete your environment file.

  2. Building docker images:

docker build -t carpoolear_backend .
  1. Run image in a container:
docker run --rm --name carpoolear_backend  -p 8080:8080 -d carpoolear_backend 
  1. Seed database:
docker exec -it carpoolear_backend php artisan migrate
docker exec -it carpoolear_backend php artisan db:seed --class=TestingSeeder
  1. Now start your frontend and enjoy carpoolear!

Docker compose file: You can start a develp environment with just one command with docker-compose:

docker-compose up -d

docker-compose.yml:

version: '2'

services:
  carpoolear_db:
    image: mysql
    container_name: carpoolear_db
    environment:
      MYSQL_DATABASE: carpoolear
      MYSQL_USER: carpoolear
      MYSQL_PASSWORD: carpoolear
      MYSQL_ROOT_PASSWORD: carpoolear
    volumes:
      - ./.db:/var/lib/mysql
    networks:
      - esnet 

  carpoolear_backend:
    build: ./backend
    container_name: carpoolear_backend
    environment:
      APP_ENV: local
      APP_DEBUG: "true"
      SERVER_PORT: 8080
      DB_HOST: carpoolear_db
      DB_DATABASE: carpoolear
      DB_USERNAME: carpoolear
      DB_PASSWORD: carpoolear
      APP_KEY: qwertyuiopasdfghjklzxcvbnm123456
      JWT_KEY: qwertyuiopasdfghjklzxcvbnm123456
      API_PREFIX: api
      API_VERSION: v1
      MAIL_DRIVER: log
    ports:
      - 8080:8080
    volumes:
      - ./backend:/app
    networks:
      - esnet 
networks:
  esnet:  

Contributing

Troubleshooting

[PDOException] - SQLSTATE[HY000] [2002] No such file or directory
  • check if the mysql server is running
  • change your .env file to DB_HOST=127.0.0.1 instead of localhost
[PDOException]                                                                          
PDO::__construct(): The server requested authentication method unknown to the client [caching_sha2_password]
  • create or alter your mysql user to use mysql_native_password
create user username@localhost identified with mysql_native_password by 'password';
alter user 'username'@'localhost' identified with mysql_native_password by 'password';

License

The Carpoolear backend is open-sourced software licensed under the GPL 3.0.

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.