Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
6274745
:arrow_up: Bump node-fetch from 2.6.0 to 2.6.1
dependabot[bot] Oct 27, 2020
cbb939e
:ambulance: ambulance: markdown linter
koromerzhin Oct 27, 2020
ab2636a
:green_heart: green_heart: test composer
koromerzhin Oct 27, 2020
2ea94ca
:green_heart: green_heart: composer validator
koromerzhin Oct 27, 2020
46d08ec
:ambulance: ambulance: change markdown linter
koromerzhin Oct 27, 2020
c90d6c2
:green_heart: green_heart: change npm install
koromerzhin Oct 27, 2020
d8afd2a
:ambulance: ambulance: change readme
koromerzhin Oct 28, 2020
388736a
:ambulance: ambulance: correction readme
koromerzhin Oct 28, 2020
32b9054
Restyled by jq (#17)
restyled-io[bot] Oct 28, 2020
f67213e
:ambulance: ambulance: Correction composer
koromerzhin Oct 28, 2020
af1b31f
:green_heart: green_heart: fusion ci
koromerzhin Oct 29, 2020
103c7d1
:alembic: alembic: new version with tests
koromerzhin Oct 30, 2020
353d4a4
:alembic: alembic: add phpunit
koromerzhin Oct 30, 2020
1da73a3
:green_heart: green_heart: correction ci/cd
koromerzhin Oct 30, 2020
0dcf8ee
:alembic: alembic: add folder src
koromerzhin Oct 30, 2020
16e61b4
:green_heart: green_heart: add folder tests
koromerzhin Oct 30, 2020
8f33c45
:green_heart: green_heart: delete help fonction
koromerzhin Oct 30, 2020
c7747f5
:green_heart: green_heart: replace old fonction
koromerzhin Oct 30, 2020
fce42f1
Pin dependencies (#20)
renovate[bot] Oct 31, 2020
edd0cf3
:arrow_up: Bump node-fetch from 2.6.0 to 2.6.1
dependabot[bot] Oct 27, 2020
3d77cbd
Restyled by jq (#17)
restyled-io[bot] Oct 28, 2020
64ecb8e
Merge branch 'dependabot/npm_and_yarn/node-fetch-2.6.1' of github.com…
koromerzhin Oct 31, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"commit": true,
"contributorsPerLine": 7,
"commitConvention": "gitmoji",
"badgeTemplate": "<a href=\"#-contributors\"><img src=\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>-orange.svg?style=flat-square\" alt=\"All Contributors\" /></a>",
"badgeTemplate": "[![All Contributors](https://img.shields.io/badge/all_contributors-<%= contributors.length %>-orange.svg?style=flat-square)](#contributors)",
"contributorTemplate": "<a href=\"<%= contributor.profile %>\"><img src=\"<%= contributor.avatar_url %>\" width=\"<%= options.imageSize %>px;\" alt=\"\"/><br /><sub><b><%= contributor.name %></b></sub></a>",
"contributors": [
{
"login": "koromerzhin",
Expand Down
64 changes: 47 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Continuous Integration
on: [push]
jobs:
router:
name: template-github
tests:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
Expand All @@ -12,22 +11,53 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get npm cache directory
id: npm-cache
run: echo "::set-output name=dir::$(package-lock.json)"
- name: Cache npm dependencies
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, xml, ctype, iconv, intl
coverage: xdebug
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::apps/$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install npm dependencies
run: make install
run: npm install
- name: Validate composer.json
run: make composer-validate-ci
- name: Install Composer dependencies
run: make composer-dev-ci
- name: linter readme.md
run: make linter-readme
run: make linter-readme
- name: Run PHP MD
run: make linter-phpmd-ci
- name: Run PHPMND
run: make linter-phpmnd-ci
- name: Test lancement bootstrap
run: make encore-dev
- name: Run twigcs
run: make linter-twigcs-ci
- name: Run phpstan
run: make linter-phpstan-ci
- name: Run Acceptance Tests
run: make tests-behat-ci
- name: Run Tests
run: make tests-simple-phpunit-unit-integration-ci
makefile:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: 'Docker swarm init'
run: docker swarm init --default-addr-pool 10.20.0.0/16
- name: 'Create proxy network'
run: make docker-create-network
- name: 'Build containers'
run: make docker-deploy
- name: 'Check running containers'
run: make docker-ls
14 changes: 0 additions & 14 deletions .github/workflows/docker.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock
node_modules
apps/node_modules/
apps/node_modules/
apps/vendor
apps/bin
101 changes: 93 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,30 @@ WWWFULLNAME := $(WWW).1.$$(docker service ps -f 'name=$(PRWWWOXY)' $(WWW) -q -
help:
@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'

composer-suggests: ## suggestions package pour PHP
docker exec $(WWWFULLNAME) make composer-suggests

composer-outdated: ## Packet php outdated
docker exec $(WWWFULLNAME) make composer-outdated

composer-prod: ## Installation version de production
docker exec $(WWWFULLNAME) make composer-prod

composer-dev: ## Installation version de dev
docker exec $(WWWFULLNAME) make composer-dev

composer-dev-ci: ## Installation version de dev
cd apps && make composer-dev

composer-update: ## COMPOSER update
docker exec $(WWWFULLNAME) make composer-update

composer-validate: ## COMPOSER validate
docker exec $(WWWFULLNAME) make composer-validate

composer-validate-ci: ## COMPOSER validate
cd apps && make composer-validate

contributors: node_modules ## Contributors
@npm run contributors

Expand All @@ -35,11 +59,8 @@ docker-image-pull: ## Get docker image
docker-logs: ## logs docker
docker service logs -f --tail 100 --raw $(WWWFULLNAME)

docker-service-ls: ## docker service
@docker service ls

docker-stack-ps: ## docker stack ps
@docker stack ps $(STACK)
docker-ls: ## docker service
@docker stack services $(STACK)

docker-showstack: ## Show stack
@make docker-stack-ps -i
Expand All @@ -53,14 +74,78 @@ git-check: node_modules ## CHECK before
@git status

install: ## Installation
@make docker-create-network -i
@make docker-deploy -i

linter: apps/vendor node_modules ## linter
@make linter-phpstan -i
@make linter-phpcpd -i
@make linter-phpcs -i
@make linter-phpmd -i
@make linter-readme -i

linter-readme: node_modules ## linter README.md
@npm run linter-readme README.md
@npm run linter-markdown README.md

linter-phpcbf: apps/vendor ## fixe le code PHP à partir d'un standard
docker exec $(WWWFULLNAME) make linter-phpcbf

linter-phpcpd: phpcpd.phar ## Vérifie s'il y a du code dupliqué
docker exec $(WWWFULLNAME) make linter-phpcpd

linter-phpcs: apps/vendor ## indique les erreurs de code non corrigé par PHPCBF
docker exec $(WWWFULLNAME) make linter-phpcs

linter-phpcs-onlywarning: apps/vendor ## indique les erreurs de code non corrigé par PHPCBF
docker exec $(WWWFULLNAME) make linter-phpcs-onlywarning

linter-phpcs-onlyerror: apps/vendor ## indique les erreurs de code non corrigé par PHPCBF
docker exec $(WWWFULLNAME) make linter-phpcs-onlyerror

linter-phpcs-onlyerror-ci: apps/vendor ## indique les erreurs de code non corrigé par PHPCBF
cd apps && make linter-phpcs-onlyerror

linter-phpinsights: apps/vendor ## PHP Insights
docker exec $(WWWFULLNAME) make linter-phpinsights

linter-phpmd: apps/vendor ## indique quand le code PHP contient des erreurs de syntaxes ou des erreurs
docker exec $(WWWFULLNAME) make linter-phpmd

linter-phpmd-ci: apps/vendor ## indique quand le code PHP contient des erreurs de syntaxes ou des erreurs
cd apps && make linter-phpmd

linter-phpmnd: apps/vendor ## Si des chiffres sont utilisé dans le code PHP, il est conseillé d'utiliser des constantes
docker exec $(WWWFULLNAME) make linter-phpmnd

linter-phpmnd-ci: apps/vendor ## Si des chiffres sont utilisé dans le code PHP, il est conseillé d'utiliser des constantes
cd apps && make linter-phpmnd

linter-phpstan: apps/vendor ## regarde si le code PHP ne peux pas être optimisé
docker exec $(WWWFULLNAME) make linter-phpstan

linter-phpstan-ci: apps/vendor ## regarde si le code PHP ne peux pas être optimisé
cd apps && make linter-phpstan

node_modules: ## npm install
npm install

ssh: ## ssh
docker exec -ti $(WWWFULLNAME) /bin/bash
docker exec -ti $(WWWFULLNAME) /bin/bash

tests-behat: apps/vendor ## Lance les tests behat
docker exec $(WWWFULLNAME) make tests-behat

tests-behat-ci: apps/vendor ## Lance les tests behat
cd apps && make tests-behat

tests-launch: apps/vendor ## Launch all tests
@make tests-behat -i
@make tests-phpunit-unit-integration -i

tests-phpunit-unit-integration: apps/vendor ## lance les tests phpunit
docker exec $(WWWFULLNAME) make tests-phpunit-unit-integration

tests-phpunit-unit-integration-ci: apps/vendor ## lance les tests phpunit
cd apps && make tests-phpunit-unit-integration

tests-phpunit: apps/vendor ## lance les tests phpunit
docker exec $(WWWFULLNAME) make tests-phpunit
90 changes: 45 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,40 @@
<h1 align="center">Welcome to template phpfpm 👋</h1>
<p>
<img alt="Version" src="https://img.shields.io/badge/version-1.0.0-blue.svg?cacheSeconds=2592000" />
<a href="https://github.com/koromerzhin/template-phpfpm#readme">
<img alt="Documentation" src="https://img.shields.io/badge/documentation-yes-brightgreen.svg" target="_blank" />
</a>
<a href="https://github.com/koromerzhin/template-phpfpm/graphs/commit-activity">
<img alt="Maintenance" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" target="_blank" />
</a>
<a href="https://github.com/koromerzhin/template-phpfpm/blob/master/LICENSE">
<img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" target="_blank" />
</a>
<!-- ALL-CONTRIBUTORS-BADGE: START - Do not remove or modify this section --><a href="#-contributors"><img src="https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square" alt="All Contributors" /></a><!-- ALL-CONTRIBUTORS-BADGE: END -->
<a href="https://twitter.com/koromerzhin">
<img alt="Twitter: koromerzhin" src="https://img.shields.io/twitter/follow/koromerzhin.svg?style=social" target="_blank" />
</a>

![docker](https://github.com/koromerzhin/template-phpfpm/workflows/docker/badge.svg?branch=develop)
![Continuous Integration](https://github.com/koromerzhin/template-phpfpm/workflows/Continuous%20Integration/badge.svg?branch=develop)
# Welcome to template phpfpm 👋

![Version](https://img.shields.io/badge/version-1.0.0-blue.svg?cacheSeconds=2592000)

![Documentation](https://img.shields.io/badge/documentation-yes-brightgreen.svg)

[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/koromerzhin/template-phpfpm/graphs/commit-activity)

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

![Continuous Integration](https://github.com/koromerzhin/template-phpfpm/workflows/Continuous%20Integration/badge.svg?branch=develop)

</p>

> Templates pour la création d'un nouveau projet phpfpm

### 🏠 [Homepage](https://github.com/koromerzhin/template-phpfpm#readme)
## 🏠 [Homepage](https://github.com/koromerzhin/template-phpfpm#readme)

## Need

Software:

* make
* npm
* docker
* repository koromerzhin/traefikproxy
- make
- npm
- docker
- repository koromerzhin/traefikproxy

Config:
Config:

docker swarm

Hosts :
Hosts:

127.0.0.1 php.lxc www.php.lxc
- 127.0.0.1 php.lxc
- 127.0.0.1 www.php.lxc

## Récupérer les images docker

Expand Down Expand Up @@ -75,47 +70,52 @@ make help

👤 **koromerzhin**

* Website: https://www.letoullec.fr
* Twitter: [@koromerzhin](https://twitter.com/koromerzhin)
* Github: [@koromerzhin](https://github.com/koromerzhin)
* LinkedIn: [@koromerzhin](https://linkedin.com/in/koromerzhin)
- Website: [https://www.letoullec.fr](https://www.letoullec.fr)
- Twitter: [@koromerzhin](https://twitter.com/koromerzhin)
- Github: [@koromerzhin](https://github.com/koromerzhin)
- LinkedIn: [@koromerzhin](https://linkedin.com/in/koromerzhin)

## 🤝 Contributing

Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/koromerzhin/template-phpfpm/issues).
Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/koromerzhin/template-phpfpm/issues).
You can also take a look at the [contributing guide](
https://github.com/koromerzhin/template-phpfpm/blob/develop/CONTRIBUTING.md
).

## Show your support

Give a ⭐️ if this project helped you!

## 📝 License

Copyright © 2019 [koromerzhin](https://github.com/koromerzhin).<br />
This project is [MIT](https://github.com/koromerzhin/template-phpfpm/blob/master/LICENSE) licensed.
Copyright © 2019 [koromerzhin](https://github.com/koromerzhin).

This project is [MIT](
https://github.com/koromerzhin/template-phpfpm/blob/develop/LICENSE
) licensed.

## ✨ Contributors

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST: START - Do not remove or modify this section -->
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>

<td align="center"><a href="https://github.com/koromerzhin"><img src="https://avatars0.githubusercontent.com/u/308012?v=4" width="100px;" alt="Le TOULLEC Martial"/><br /><sub><b>Le TOULLEC Martial</b></sub></a><br /><a href="https://github.com/koromerzhin/mtos/commits?author=koromerzhin" title="Code">💻</a></td>
<td align="center"><a href="https://renovatebot.com"><img src="https://avatars0.githubusercontent.com/u/25180681?v=4" width="100px;" alt="Renovate Bot"/><br /><sub><b>Renovate Bot</b></sub></a><br /><a href="#tool-renovate-bot" title="Tools">🔧</a></td>
<td align="center"><a href="https://github.com/apps/dependabot"><img src="https://avatars0.githubusercontent.com/in/29110?v=4" width="100px;" alt="dependabot[bot]"/><br /><sub><b>dependabot[bot]</b></sub></a><br /><a href="https://github.com/koromerzhin/mtos/commits?author=dependabot[bot]" title="Code">💻</a> <a href="#maintenance-dependabot[bot]" title="Maintenance">🚧</a> <a href="#plugin-dependabot[bot]" title="Plugin/utility libraries">🔌</a> <a href="#security-dependabot[bot]" title="Security">🛡️</a> <a href="#tool-dependabot[bot]" title="Tools">🔧</a></td>
<td align="center"><a href="https://github.com/apps/dependabot-preview"><img src="https://avatars3.githubusercontent.com/in/2141?v=4" width="100px;" alt="dependabot-preview[bot]"/><br /><sub><b>dependabot-preview[bot]</b></sub></a><br /><a href="https://github.com/koromerzhin/mtos/commits?author=dependabot-preview[bot]" title="Code">💻</a> <a href="#maintenance-dependabot-preview[bot]" title="Maintenance">🚧</a> <a href="#plugin-dependabot-preview[bot]" title="Plugin/utility libraries">🔌</a> <a href="https://github.com/koromerzhin/mtos/pulls?q=is%3Apr+reviewed-by%3Adependabot-preview[bot]" title="Reviewed Pull Requests">👀</a> <a href="#security-dependabot-preview[bot]" title="Security">🛡️</a> <a href="#tool-dependabot-preview[bot]" title="Tools">🔧</a></td>

<td align="center"><a href="https://github.com/koromerzhin"><img src="https://avatars0.githubusercontent.com/u/308012?v=4" width="100px;" alt=""/><br /><sub><b>Le TOULLEC Martial</b></sub></a></td>
</tr>
</table>

<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST: END -->
<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors)
specification. Contributions of any kind welcome!

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
---

***
_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_
_This README was generated with ❤️ by
[readme-md-generator](https://github.com/kefranabg/readme-md-generator)_
Loading