Skip to content

Commit

Permalink
TIP-748: Configure docker and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
anaelChardan committed Jul 12, 2017
1 parent f38c464 commit 22e67dc
Show file tree
Hide file tree
Showing 6 changed files with 115 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[//]: <> (<3 Thanks for taking the time to contribute! You're awesome! <3)
**Description**

[//]: <> (What does this Pull Request do? reference the related issue?)

**Definition Of Done**

| Q | A
| --------------------------------- | ---
| Added Specs | Todo
| Review and 2 GTM | Todo
| Micro Demo to the PO (Story only) | Todo

`Todo`: Pending / Work in progress
`OK`: Done / Validated
`-`: Not needed
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/vendor/
/var/
!/var/.gitkeep
docker-compose.yml
composer.lock
.php_cs.cache
9 changes: 9 additions & 0 deletions .php_cs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

return PhpCsFixer\Config::create()
->setRules(array('@Symfony' => true))
->setFinder(
PhpCsFixer\Finder::create()
->name('*.php')
->in(__DIR__ . '/src')
);
37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#=== Akeneo PIM Migration tool helper ===

# Styles
YELLOW=$(shell echo "\033[00;33m")
RED=$(shell echo "\033[00;31m")
RESTORE=$(shell echo "\033[0m")

CURRENT_DIR := $(shell pwd)

.PHONY: list
list:
@echo ""
@echo "Akeneo PIM Migration tool available targets:"
@echo ""
@echo " $(YELLOW)fix-style$(RESTORE) > run the PHP-CS-FIXER"
@echo ""
@echo ""
@echo " $(YELLOW)install$(RESTORE) > install vendors"
@echo " $(YELLOW)update(RESTORE) > update vendors"
@echo " $(YELLOW)run$(RESTORE) > run the tool"
@echo " $(YELLOW)clean$(RESTORE) > removes the vendors"

.PHONY: fix-style
fix-style:
docker-compose run php vendor/bin/php-cs-fixer fix --config=./.php_cs.php

.PHONY: install
install:
docker-compose run php composer install

.PHONY: update
update:
docker-compose run php composer update

.PHONY: clean
clean:
rm -rf vendor
29 changes: 29 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "akeneo/migration-tool",
"description": "Migrate your PIM to the latest version!",
"license": "OSL-3.0",
"authors": [
{
"name": "Akeneo",
"homepage": "http://www.akeneo.com"
}
],
"autoload": {
"psr-4": {
"Akeneo\\PimMigration\\": "src/"
}
},
"require": {
"php": ">=7.1.0",
"phpseclib/phpseclib": "~2.0",
"symfony/config": "3.3.4",
"symfony/console": "3.3.4",
"symfony/dependency-injection": "3.3.4"
},
"require-dev": {
"phpspec/phpspec": "3.0.*",
"phpunit/phpunit": "5.4.*",
"friendsofphp/php-cs-fixer": "2.3.2"
},
"minimum-stability": "stable"
}
18 changes: 18 additions & 0 deletions docker-compose.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '2'

services:
php:
image: akeneo/php:php-7.1
environment:
COMPOSER_HOME: /home/docker/.composer
XDEBUG_CONFIG: 'remote_host=xxx.xxx.xxx.xxx'
user: docker
volumes:
- ./:/home/docker/migration
- ~/.config/composer:/home/docker/.composer
working_dir: /home/docker/migration
networks:
- akeneo

networks:
akeneo: ~

0 comments on commit 22e67dc

Please sign in to comment.