Skip to content

Commit

Permalink
Merge pull request #20 from devclouse/master
Browse files Browse the repository at this point in the history
Automatic installation of latest versions of nuxt and laravel
  • Loading branch information
xalaida authored Apr 17, 2021
2 parents 228e525 + c723a69 commit 8f54f29
Show file tree
Hide file tree
Showing 111 changed files with 41 additions and 19,733 deletions.
18 changes: 10 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ autoload:
docker-compose exec php composer dump-autoload

# Install the environment
install: build env-api env-client composer-install key storage permissions migrate rc
install: build install-laravel env-api migrate install-nuxt env-client restart


#-----------------------------------------------------------
Expand All @@ -247,7 +247,7 @@ git-export:
#-----------------------------------------------------------

# Laravel
reinstall-laravel:
install-laravel:
docker-compose down
sudo rm -rf api
mkdir api
Expand All @@ -262,17 +262,15 @@ reinstall-laravel:
docker-compose exec php composer require predis/predis
docker-compose exec php php artisan --version

# Nuxt.JS
reinstall-nuxt:
# Nuxt
install-nuxt:
docker-compose down
sudo rm -rf client
mkdir client
docker-compose up -d
docker-compose run client yarn create nuxt-app .
docker-compose run client yarn create nuxt-app ../client
sudo chown ${USER}:${USER} -R client
cp .env.client client/.env
sed -i "1i require('dotenv').config()" client/nuxt.config.js
docker-compose restart client
docker-compose up -d
docker-compose exec client yarn info nuxt version


Expand All @@ -287,3 +285,7 @@ remove-volumes:
# Remove all existing networks (useful if network already exists with the same attributes)
prune-networks:
docker network prune

# Clear cache
prune-a:
docker system prune -a
52 changes: 5 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ Look at one of the following topics to learn more about the project
* [Reinstallation](#reinstallation-frameworks)

## Stack includes
* Laravel (clean 8.4.0 version)
* Nuxt.JS (clean 2.14.5 version)
* PostgreSQL 11.3
* Nginx
* Redis 3.0
* Laravel (auto install latest version)
* Nuxt.JS (auto install latest version)
* PostgreSQL 13.2
* Nginx 1.18.0
* Redis 6.2
* Supervisor (queues, schedule commands, etc.)
* Mailhog (SMPT testing)

Expand Down Expand Up @@ -68,35 +68,6 @@ Open [http://localhost:8080](http://localhost:8080) url in your browser.

_If you see the 502 error page, just wait a bit when ```yarn install && yarn dev``` process will be finished (Check the status with the command ```docker-compose logs client```)_

#### Manual installation
If you do not have available the make utility, or you just want to install the project manually, you can go through the installation process running the following commands:

**Build and up docker containers (It may take up to 10 minutes)**
```
docker-compose up -d --build
```

**Install composer dependencies:**
```
docker-compose exec php composer install
```

**Copy environment files**
```
cp .env.api api/.env
cp .env.client client/.env
```

**Set up laravel permissions**
```
sudo chmod -R 777 api/bootstrap/cache
sudo chmod -R 777 api/storage
```

**Restart the client container**
```
docker-compose restart client
```

## Basic usage
Your base url is ```http://localhost:8080```. All requests to Laravel API must be sent using to the url starting with `/api` prefix. Nginx server will proxy all requests with ```/api``` prefix to the node static server which serves the Nuxt.
Expand Down Expand Up @@ -326,19 +297,6 @@ docker-compose exec php bash
docker-compose exec client /bin/sh
```

## Reinstallation frameworks
If you want to reinstall Laravel OR Nuxt from scratch with a fresh version, use the following command

##### Laravel
```
make reinstall-laravel
```

##### Nuxt
```
make reinstall-nuxt
```

During the nuxt app creation select the following options:
- Choose the package manager
- [x] Yarn
Expand Down
15 changes: 0 additions & 15 deletions api/.editorconfig

This file was deleted.

46 changes: 0 additions & 46 deletions api/.env.example

This file was deleted.

5 changes: 0 additions & 5 deletions api/.gitattributes

This file was deleted.

12 changes: 0 additions & 12 deletions api/.gitignore

This file was deleted.

13 changes: 0 additions & 13 deletions api/.styleci.yml

This file was deleted.

62 changes: 2 additions & 60 deletions api/README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,3 @@
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400"></a></p>
# This directory is needed for the Laravel application

<p align="center">
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/d/total.svg" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/v/stable.svg" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/license.svg" alt="License"></a>
</p>

## About Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:

- [Simple, fast routing engine](https://laravel.com/docs/routing).
- [Powerful dependency injection container](https://laravel.com/docs/container).
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).

Laravel is accessible, powerful, and provides tools required for large, robust applications.

## Learning Laravel

Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.

If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.

## Laravel Sponsors

We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).

### Premium Partners

- **[Vehikl](https://vehikl.com/)**
- **[Tighten Co.](https://tighten.co)**
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
- **[64 Robots](https://64robots.com)**
- **[Cubet Techno Labs](https://cubettech.com)**
- **[Cyber-Duck](https://cyber-duck.co.uk)**
- **[Many](https://www.many.co.uk)**
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
- **[DevSquad](https://devsquad.com)**
- **[OP.GG](https://op.gg)**

## Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).

## Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).

## Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.

## License

The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
It will be installed during the initial build process with the `make install` command.
41 changes: 0 additions & 41 deletions api/app/Console/Kernel.php

This file was deleted.

37 changes: 0 additions & 37 deletions api/app/Exceptions/Handler.php

This file was deleted.

13 changes: 0 additions & 13 deletions api/app/Http/Controllers/Controller.php

This file was deleted.

Loading

0 comments on commit 8f54f29

Please sign in to comment.