-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from student-techlife/dev
Final version
- Loading branch information
Showing
521 changed files
with
92,613 additions
and
1,268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.github | ||
extra | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
groups: | ||
- name: devs | ||
reviewers: 1 | ||
usernames: | ||
- klaasnicolaas | ||
- larsniet | ||
- draZer0 | ||
- veracompagner | ||
- annesophie-h | ||
- Joeriubink |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Add WIP labels for PRs that are set to be work-in-progress, no other label will be added. | ||
addWipLabel: true | ||
|
||
# Configuration for labels, set ignore to true to skip adding label | ||
labels: | ||
wip: | ||
name: "🚧 WIP" | ||
color: "#FBCA04" | ||
description: "Still work-in-progress, please don't review and don't merge" | ||
ignore: false | ||
unreviewed: | ||
name: "🔍 Ready for Review" | ||
color: "#334796" | ||
description: "Pull Request is not reviewed yet" | ||
ignore: false | ||
approved: | ||
name: "✅ Approved" | ||
color: "#0E8A16" | ||
description: "Pull Request has been approved and can be merged" | ||
ignore: false | ||
needsMoreApprovals: | ||
name: "🌟 Needs more Approvals" | ||
color: "#96C823" | ||
description: "Pull Request needs more approvals" | ||
ignore: true | ||
changesRequested: | ||
name: "⚠️ Changes requested" | ||
color: "#AA2626" | ||
description: "Pull Request needs changes before it can be reviewed again" | ||
ignore: false | ||
merged: | ||
name: "✨ Merged" | ||
color: "#6F42C1" | ||
description: "Pull Request has been merged successfully" | ||
ignore: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,68 @@ | ||
name: Binnentuinapp | ||
|
||
name: Binnentuin - Backend deploy | ||
on: | ||
push: | ||
branches: master | ||
# Negeer commits die zijn gemaakt in: | ||
paths-ignore: | ||
- '.github/**' | ||
- 'extra/**' | ||
- 'README.md' | ||
- LICENSE | ||
# De branch waarop het getriggerd wordt | ||
branches: dev | ||
|
||
jobs: | ||
phpunit: | ||
name: PHPUnit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: nathanheffley/laravel-phpunit-action@master | ||
# - uses: nathanheffley/laravel-phpunit-action@master | ||
- name: Laravel PHPunit test | ||
run: | | ||
composer install --prefer-dist | ||
cp .env.example .env | ||
php artisan key:generate | ||
php vendor/bin/phpunit | ||
working-directory: ./laravel | ||
deploy: | ||
name: Deploy to production | ||
runs-on: ubuntu-latest | ||
needs: phpunit | ||
if: github.ref == 'refs/heads/master' | ||
if: github.ref == 'refs/heads/dev' | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@master | ||
- name: Create .env file | ||
run: 'echo "$ENV_FILE" > .env' | ||
shell: bash | ||
env: | ||
ENV_FILE: ${{secrets.DOT_ENV}} | ||
working-directory: ./laravel | ||
- name: Docker registry login | ||
# run: docker login ${{ secrets.DOCKER_REGISTRY }}:5000 | ||
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }} | ||
# Build images | ||
- name: Create Laravel Backend image | ||
run: docker build -t studenttechlife/plant:backend . | ||
working-directory: ./laravel | ||
- name: Create NGINX image | ||
run: docker build -t studenttechlife/plant:nginx . | ||
# Push new docker images | ||
- name: Push docker images | ||
run: | | ||
docker push studenttechlife/plant:backend | ||
docker push studenttechlife/plant:nginx | ||
# Update service image in swarm | ||
- name: Deploy Laravel to swarm | ||
uses: garygrossgarten/github-action-ssh@release | ||
with: | ||
php-version: 7.4 | ||
extensions: mbstring, bcmath | ||
- name: Composer install | ||
run: composer install | ||
- name: Setup Deployer | ||
uses: atymic/deployer-php-action@master | ||
command: docker service update --image studenttechlife/plant:backend plant_backend | ||
host: ${{ secrets.DOCKER_VPN }} | ||
username: plant | ||
privateKey: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }} | ||
- name: Deploy NGINX to swarm | ||
uses: garygrossgarten/github-action-ssh@release | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
ssh-known-hosts: ${{ secrets.SSH_KNOWN_HOSTS }} | ||
- name: Run Deployment | ||
env: | ||
DOT_ENV: ${{ secrets.DOT_ENV }} | ||
APP_HOST: ${{ secrets.APP_HOST }} | ||
APP_DEPLOY_PATH: ${{ secrets.APP_DEPLOY_PATH }} | ||
APP_DEPLOY_USER: ${{ secrets.APP_DEPLOY_USER }} | ||
APP_DEPLOY_DEFAULT: ${{ secrets.APP_DEPLOY_DEFAULT }} | ||
run: php artisan deploy -vvv | ||
command: docker service update --image studenttechlife/plant:nginx plant_nginx | ||
host: ${{ secrets.DOCKER_VPN }} | ||
username: plant | ||
privateKey: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Check for merge conflicts | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
triage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: mschilde/auto-label-merge-conflicts@master | ||
with: | ||
CONFLICT_LABEL_NAME: "merge conflicts" | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Laravel PHPunit test | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
phpunit: | ||
name: PHPUnit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
# - uses: nathanheffley/laravel-phpunit-action@master | ||
- name: Laravel PHPunit test | ||
run: | | ||
composer install --prefer-dist | ||
cp .env.example .env | ||
php artisan key:generate | ||
php vendor/bin/phpunit | ||
working-directory: ./laravel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Assign to Pull Request | ||
on: | ||
pull_request: | ||
branches-ignore: | ||
- 'dependabot/**' | ||
types: [opened, ready_for_review, reopened] | ||
|
||
jobs: | ||
assign: | ||
name: Assign member | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: uesteibar/reviewer-lottery@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1 @@ | ||
/node_modules | ||
/public/hot | ||
/public/storage | ||
/storage/*.key | ||
/vendor | ||
.env | ||
.env.backup | ||
.phpunit.result.cache | ||
Homestead.json | ||
Homestead.yaml | ||
npm-debug.log | ||
yarn-error.log | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Nginx proxy server | ||
FROM nginx:1.19.0-alpine | ||
|
||
COPY ./laravel /var/www | ||
ADD ./nginx/vhost.conf /etc/nginx/conf.d/default.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,63 @@ | ||
<p align="center"><img src="https://res.cloudinary.com/dtfbvvkyp/image/upload/v1566331377/laravel-logolockup-cmyk-red.svg" width="400"></p> | ||
![Binnentuin - Backend deploy](https://github.com/student-techlife/IPMEDT4-binnentuin-backend/workflows/Binnentuin%20-%20Backend%20deploy/badge.svg) | ||
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=student-techlife/IPMEDT4-binnentuin-backend)](https://dependabot.com) | ||
|
||
<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> | ||
# De Binnentuin app (backend) | ||
|
||
## About Laravel | ||
Deze repository is de backend-side van de binnentuin applicatie. | ||
|
||
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: | ||
Het projectgroep bestaat uit: | ||
|
||
- [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). | ||
- Klaas | ||
- Lars | ||
- Vera | ||
- Anne-Sophie | ||
- Joeri | ||
- Ard | ||
|
||
Laravel is accessible, powerful, and provides tools required for large, robust applications. | ||
## ℹ️ Gebruik van deze repository | ||
|
||
## Learning Laravel | ||
Om zoveel mogelijk git probleempjes te voorkomen, zijn er een aantal richtlijnen: | ||
|
||
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. | ||
- De `dev` branch is de bakermat van de development. | ||
- 🤷 Wanneer je aan de slag gaat (nieuwe features/bugfix etc.) werk je in een branch die afstamt van de `dev` branch. Middels een **Pull Request** met als target branch `dev`, voeg je uiteindelijk je wijzigingen samen. | ||
- 📅 Wanneer we tot een stable release komen, volgt er een merge van `dev` naar `master` met een release tag. | ||
- ⛔ Er mogen geen directe commits worden uitgevoerd op de `dev` en `master` branch (uitzonderingen daargelaten, branches zijn protected). | ||
- 🔎 Een PR dient door iemand anders dan je zelf te worden **gereviewed** en **gemerged**, iedereen krijgt automatisch een PR ter review toebedeeld. | ||
|
||
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. | ||
# 🧰 Hoe aan de slag? | ||
|
||
## Laravel Sponsors | ||
Hieronder staat beschreven hoe je een werk omgeving kan opzetten. Kom je er niet uit? Geef dit dan aan binnen het team 😄 Heb je problemen met GIT? Bekijk dan de [eerste hulp bij GIT problemen](/extra/help.md) pagina. | ||
|
||
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). | ||
## Voorbereiding | ||
|
||
- **[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)** | ||
- [UserInsights](https://userinsights.com) | ||
- [Fragrantica](https://www.fragrantica.com) | ||
- [SOFTonSOFA](https://softonsofa.com/) | ||
- [User10](https://user10.com) | ||
- [Soumettre.fr](https://soumettre.fr/) | ||
- [CodeBrisk](https://codebrisk.com) | ||
- [1Forge](https://1forge.com) | ||
- [TECPRESSO](https://tecpresso.co.jp/) | ||
- [Runtime Converter](http://runtimeconverter.com/) | ||
- [WebL'Agence](https://weblagence.com/) | ||
- [Invoice Ninja](https://www.invoiceninja.com) | ||
- [iMi digital](https://www.imi-digital.de/) | ||
- [Earthlink](https://www.earthlink.ro/) | ||
- [Steadfast Collective](https://steadfastcollective.com/) | ||
- [We Are The Robots Inc.](https://watr.mx/) | ||
- [Understand.io](https://www.understand.io/) | ||
- [Abdel Elrafa](https://abdelelrafa.com) | ||
- [Hyper Host](https://hyper.host) | ||
- [Appoly](https://www.appoly.co.uk) | ||
- [OP.GG](https://op.gg) | ||
- [云软科技](http://www.yunruan.ltd/) | ||
Voordat je een werk omgeving opzet, is het eerst belangrijk om de MySQL database in orde te krijgen. Database draaien in docker? Ask @klaasnicolaas. | ||
|
||
## Contributing | ||
1. Login in je MySQL omgeving. | ||
2. Maak een nieuwe database aan: `CREATE DATABASE [NAAAM DATABASE];` | ||
3. (optioneel) Maak een nieuwe gebruiker aan: `CREATE USER '[GEBRUIKERSNAAM]'@'localhost' IDENTIFIED BY '[WACHTWOORD]';` | ||
4. Geef de (nieuwe) gebruiker rechten over de gemaakte database: `GRANT ALL PRIVILEGES ON [DATABASE NAAM].* TO '[GEBRUIKERSNAAM]'@'localhost';` | ||
|
||
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). | ||
## Opzetten werk omgeving | ||
|
||
## Code of Conduct | ||
1. Clone deze repository naar een gewenste directory: `git clone [email protected]:student-techlife/IPMEDT4-binnentuin-backend.git` | ||
2. Zorg er voor dat je in MySQL [een database hebt met username en (native) password](#voorbereiding) | ||
3. Navigeer in je code editor naar de `laravel` directory | ||
4. Maak een kopie van de file: `.env.example` en hernoem het naar `.env` | ||
5. Pas de database gegevens aan in de `.env` file met jouw eigen MySQL gegevens | ||
6. Open een terminal in de `laravel` directory | ||
7. Voer uit: `composer install` | ||
8. Voer uit: `php artisan key:generate` | ||
9. Check in de `.env` file of de variable `API_KEY=` is ingevuld | ||
10. Voer uit: `php artisan migrate` | ||
11. Voer uit: `php artisan serve` | ||
|
||
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). | ||
Als het goed is moet je nu via de URL een scherm krijgen waar je kan inloggen. | ||
|
||
## Security Vulnerabilities | ||
# ➕ Handige VSCODE extensions | ||
|
||
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [[email protected]](mailto:[email protected]). All security vulnerabilities will be promptly addressed. | ||
- [Laravel Blade Snippets](https://marketplace.visualstudio.com/items?itemName=onecentlin.laravel-blade) | ||
- [Laravel Artisan](https://marketplace.visualstudio.com/items?itemName=ryannaddy.laravel-artisan) | ||
- [Live Share](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack) | ||
|
||
## License | ||
|
||
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). | ||
--- | ||
Dit project is naar aanleiding van een studie project aan de Hogeschool van Leiden. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.