Skip to content

Forward-port 1.0 #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Oct 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 5 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.idea
vendor
composer.phar
composer.lock
.DS_Store
auth.json
docker-compose.yml
/.idea
/vendor
/composer.phar
/composer.lock
/auth.json
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ php:
install: composer update

script:
- ./vendor/bin/phpunit
- ./vendor/bin/phpstan analyse -c ./tests/static/phpstan.neon
- ./vendor/bin/phpcs ./src --standard=./tests/static/phpcs-ruleset.xml -p -n
- ./vendor/bin/phpmd ./src xml ./tests/static/phpmd-ruleset.xml
- ./vendor/bin/phpunit --configuration ./tests/unit

18 changes: 14 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@
"symfony/config": "^3.4||^4.0",
"symfony/console": "^2.3||^4.0",
"symfony/dependency-injection": "^3.1||^4.0",
"symfony/yaml": "^4.0"
"symfony/yaml": "^3.3||^4.0"
},
"require-dev": {
"phpunit/phpunit": "^6.2"
"phpmd/phpmd": "@stable",
"phpstan/phpstan": "^0.11",
"phpunit/phpunit": "^6.2",
"squizlabs/php_codesniffer": "^3.0"
},
"bin": [
"bin/ece-docker"
Expand All @@ -32,8 +35,15 @@
},
"scripts": {
"test": [
"phpunit"
]
"@phpstan",
"@phpcs",
"@phpmd",
"@phpunit"
],
"phpstan": "phpstan analyse -c tests/static/phpstan.neon",
"phpcs": "phpcs src --standard=tests/static/phpcs-ruleset.xml -p -n",
"phpmd": "phpmd src xml tests/static/phpmd-ruleset.xml",
"phpunit": "phpunit --configuration tests/unit"
},
"config": {
"sort-packages": true
Expand Down
15 changes: 10 additions & 5 deletions config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@
<defaults autowire="true" autoconfigure="true" public="true"/>

<prototype namespace="Magento\CloudDocker\" resource="../src/*" exclude="../src/{App,Test}"/>
<service id="Magento\CloudDocker\App\GenericException" autowire="false"/>
<service id="Magento\CloudDocker\App\ConfigurationMismatchException" autowire="false"/>
<service id="Magento\CloudDocker\Compose\BuilderFactory">
<argument key="$strategies" type="collection">
<argument key="developer">Magento\CloudDocker\Compose\DeveloperBuilder</argument>
<argument key="production">Magento\CloudDocker\Compose\ProductionBuilder</argument>
<argument key="functional">Magento\CloudDocker\Compose\FunctionalBuilder</argument>
</argument>
</service>
<service id="Magento\CloudDocker\Filesystem\DirectoryList" autowire="false"/>
<service id="Magento\CloudDocker\Filesystem\FilesystemException" autowire="false"/>
<service id="Magento\CloudDocker\Compose\DeveloperCompose" shared="false"/>
<service id="Magento\CloudDocker\Compose\ProductionCompose" shared="false"/>
<service id="Magento\CloudDocker\Compose\FunctionalCompose" shared="false"/>
<service id="Magento\CloudDocker\Compose\DeveloperBuilder" shared="false"/>
<service id="Magento\CloudDocker\Compose\ProductionBuilder" shared="false"/>
<service id="Magento\CloudDocker\Compose\FunctionalBuilder" shared="false"/>
<service id="Illuminate\Filesystem\Filesystem"/>
<service id="Composer\Semver\VersionParser"/>
<service id="Composer\Semver\Semver"/>
Expand Down
14 changes: 7 additions & 7 deletions dist/bin/magento-docker
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ case "$1" in
docker-compose down --volumes
;;
bash)
docker-compose run deploy bash
docker-compose run --rm deploy bash
;;
stop)
docker-compose stop
Expand All @@ -48,18 +48,18 @@ case "$1" in
docker-compose restart
;;
ece-build)
docker-compose run build cloud-build
docker-compose run --rm build cloud-build
;;
ece-deploy)
docker-compose run deploy cloud-deploy
docker-compose run --rm deploy cloud-deploy
;;
ece-post-deploy)
docker-compose run deploy cloud-post-deploy
docker-compose run --rm deploy cloud-post-deploy
;;
ece-redeploy)
docker-compose run build cloud-build
docker-compose run deploy cloud-deploy
docker-compose run deploy cloud-post-deploy
docker-compose run --rm build cloud-build
docker-compose run --rm deploy cloud-deploy
docker-compose run --rm deploy cloud-post-deploy
;;
*)
printf "$USAGE"
Expand Down
2 changes: 0 additions & 2 deletions dist/docker-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@ syncs:
- '.magento'
- '.docker'
- '.github'
sync_userid: '1000'
sync_groupid: '1000'
2 changes: 0 additions & 2 deletions dist/mutagen.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/bin/bash
mutagen create \
--label=magento-docker \
--default-group-beta=www \
--default-owner-beta=www \
--sync-mode=two-way-resolved \
--default-file-mode=0644 \
--default-directory-mode=0755 \
Expand Down
13 changes: 6 additions & 7 deletions images/nginx/1.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ COPY etc/vhost.conf /etc/nginx/conf.d/default.conf

RUN touch /var/run/nginx.pid

EXPOSE 80 443
EXPOSE 80

ENV UPLOAD_MAX_FILESIZE 64M
ENV FPM_HOST fpm
Expand All @@ -14,20 +14,19 @@ ENV MAGENTO_ROOT /app
ENV MAGENTO_RUN_MODE production
ENV DEBUG false

RUN groupadd -g 1000 www && useradd -g 1000 -u 1000 -d ${MAGENTO_ROOT} -s /bin/bash www
RUN chown -R www:www /etc/nginx /var/cache/nginx /var/run/nginx.pid

RUN apt-get update && apt-get install -y openssl
RUN mkdir /etc/nginx/ssl \
&& echo -e "\n\n\n\n\n\n\n" | openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/magento.key -out /etc/nginx/ssl/magento.crt

RUN groupadd -g 1000 www && useradd -g 1000 -u 1000 -d ${MAGENTO_ROOT} -s /bin/bash www

VOLUME ${MAGENTO_ROOT}

COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN ["chmod", "+x", "/docker-entrypoint.sh"]
ENTRYPOINT ["/docker-entrypoint.sh"]

RUN mkdir ${MAGENTO_ROOT} && chown -R www:www ${MAGENTO_ROOT}

VOLUME ${MAGENTO_ROOT}
USER root

WORKDIR ${MAGENTO_ROOT}

Expand Down
2 changes: 1 addition & 1 deletion images/nginx/1.9/etc/vhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ server {
listen 80;
listen 443 ssl;

server_name localhost;
server_name _;

set $MAGE_ROOT !MAGENTO_ROOT!; # Variable: MAGENTO_ROOT
set $MAGE_MODE !MAGENTO_RUN_MODE!; # Variable: MAGENTO_RUN_MODE
Expand Down
214 changes: 0 additions & 214 deletions images/php/7.0-cli-dev/Dockerfile

This file was deleted.

Loading