Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
docker-php-yii2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dmstr
docker-php-yii2
Commits
2f3cc16d
Commit
2f3cc16d
authored
Feb 02, 2017
by
Tobias Munk
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'latest'
Master See merge request
!5
parents
015c5293
593221d6
Pipeline
#18881
passed with stages
in 8 minutes and 44 seconds
Changes
8
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
47 additions
and
20 deletions
+47
-20
.gitlab-ci.yml
.gitlab-ci.yml
+14
-17
Dockerfile-fpm-alpine-nginx-xdebug
nginx/Dockerfile-fpm-alpine-nginx-xdebug
+2
-1
Dockerfile-fpm
php-7.0/Dockerfile-fpm
+1
-0
Dockerfile-fpm-alpine
php-7.0/Dockerfile-fpm-alpine
+1
-0
app.ini
php-7.0/image-files/usr/local/etc/php/conf.d/app.ini
+2
-0
debug.sh
test/debug.sh
+19
-0
dev.sh
test/dev.sh
+2
-2
prod.sh
test/prod.sh
+6
-0
No files found.
.gitlab-ci.yml
View file @
2f3cc16d
...
...
@@ -12,7 +12,7 @@ stages:
before_script
:
-
export ISOLATION=buildpipeline{CI_BUILD_PIPELINE}
-
export ISOLATION=buildpipeline
$
{CI_BUILD_PIPELINE}
-
export COMPOSE_PROJECT_NAME=${ISOLATION}
-
export APP_VERSION=$(git describe --always --dirty)
-
export PHP_IMAGE_NAME=dmstr/php-yii2
...
...
@@ -36,13 +36,18 @@ build:php-alpine:
test:php
:
stage
:
php-test
script
:
-
PHP_SERVICE=php sh test/image-commands.sh
-
export PHP_SERVICE=php
-
sh test/prod.sh
-
sh test/dev.sh
-
sh test/debug.sh
-
docker-compose run --rm php php /test/requirements.php
test:php-alpine
:
stage
:
php-test
script
:
-
PHP_SERVICE=php-alpine sh test/image-commands.sh
-
export PHP_SERVICE=php-alpine
-
sh test/prod.sh
-
sh test/dev.sh
-
docker-compose run --rm php-alpine php /test/requirements.php
test:php:allow-fail
:
...
...
@@ -50,14 +55,6 @@ test:php:allow-fail:
script
:
-
cd php-7.0
-
docker run ${STACK_PHP_IMAGE} sh -c 'composer global update --dry-run; composer diagnose'
-
PHP_ENABLE_XDEBUG=1 docker-compose up -d
-
sleep 15
-
docker-compose exec php php -i | grep xdebug
-
docker-compose up -d
-
docker-compose ps
-
docker-compose logs
-
sleep 10
-
docker-compose exec php php -i | grep xdebug
allow_failure
:
true
except
:
-
tags
...
...
@@ -97,11 +94,9 @@ build:php-alpine-nginx:
test:php-alpine-nginx
:
stage
:
nginx-test
script
:
-
docker-compose run --rm php-alpine-nginx php --version
-
docker-compose run --rm php-alpine-nginx composer --version
-
docker-compose run --rm php-alpine-nginx codecept --version
-
docker-compose run --rm php-alpine-nginx phpunit --version
-
docker-compose run --rm php-alpine-nginx mysql --version
-
sh test/prod.sh
-
sh test/dev.sh
-
docker-compose run --rm php-alpine-nginx nginx -v
release:nginx:latest
:
stage
:
nginx-release
...
...
@@ -125,7 +120,9 @@ build:php-alpine-nginx-xdebug:
test:php-alpine-nginx-xdebug
:
stage
:
nginx-xdebug-test
script
:
-
docker-compose run --rm -e PHP_ENABLE_XDEBUG=1 php-alpine-nginx-xdebug php -i | grep xdebug
-
sh test/debug.sh
release:php-alpine-nginx-xdebug:latest
:
stage
:
nginx-xdebug-release
...
...
nginx/Dockerfile-fpm-alpine-nginx-xdebug
View file @
2f3cc16d
...
...
@@ -4,4 +4,5 @@ RUN apk --no-cache add --virtual .build-deps \
g++ \
autoconf \
make \
&& pecl install xdebug
\ No newline at end of file
&& pecl install xdebug \
&& apk del .build-deps
\ No newline at end of file
php-7.0/Dockerfile-fpm
View file @
2f3cc16d
...
...
@@ -38,6 +38,7 @@ RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-di
pdo_mysql \
mbstring \
mcrypt \
opcache \
zip \
bcmath \
soap
...
...
php-7.0/Dockerfile-fpm-alpine
View file @
2f3cc16d
...
...
@@ -38,6 +38,7 @@ RUN apk --update add \
iconv \
intl \
mbstring \
opcache \
pdo_mysql \
pdo_pgsql && \
apk del \
...
...
php-7.0/image-files/usr/local/etc/php/conf.d/app.ini
View file @
2f3cc16d
...
...
@@ -4,7 +4,9 @@ date.timezone = UTC
; General settings
memory_limit
=
128M
max_execution_time
=
30
sys_temp_dir
=
/tmp
upload_max_filesize
=
512M
upload_tmp_dir
=
/tmp
post_max_size
=
512M
; Security, Debug & Logs
...
...
test/debug.sh
0 → 100644
View file @
2f3cc16d
#!/usr/bin/env bash
PHP_SERVICE
=
${
PHP_SERVICE
-php
}
echo
"Running one-off command with xdebug"
docker-compose run
-e
PHP_ENABLE_XDEBUG
=
1
${
PHP_SERVICE
}
php
-i
|
grep
xdebug
echo
"Starting stack with xdebug"
PHP_ENABLE_XDEBUG
=
1 docker-compose up
-d
${
PHP_SERVICE
}
sleep
5
docker-compose
exec
${
PHP_SERVICE
}
php
-i
--
|
grep
xdebug
docker-compose down
-v
echo
"Starting stack without xdebug"
PHP_ENABLE_XDEBUG
=
0 docker-compose up
-d
${
PHP_SERVICE
}
sleep
5
docker-compose
exec
${
PHP_SERVICE
}
"php -i"
|
grep
xdebug
docker-compose down
-v
test/
image-commands
.sh
→
test/
dev
.sh
View file @
2f3cc16d
...
...
@@ -2,9 +2,9 @@
PHP_SERVICE
=
${
PHP_SERVICE
-php
}
docker-compose run
--rm
${
PHP_SERVICE
}
php
--version
docker-compose run
--rm
${
PHP_SERVICE
}
composer
--version
docker-compose run
--rm
${
PHP_SERVICE
}
codecept
--version
docker-compose run
--rm
${
PHP_SERVICE
}
phpunit
--version
docker-compose run
--rm
${
PHP_SERVICE
}
mysql
--version
docker-compose run
--rm
${
PHP_SERVICE
}
git
--version
\ No newline at end of file
docker-compose run
--rm
${
PHP_SERVICE
}
git
--version
docker-compose run
--rm
${
PHP_SERVICE
}
npm
--version
\ No newline at end of file
test/prod.sh
0 → 100644
View file @
2f3cc16d
#!/usr/bin/env bash
PHP_SERVICE
=
${
PHP_SERVICE
-php
}
docker-compose run
--rm
${
PHP_SERVICE
}
php
--version
docker-compose run
--rm
${
PHP_SERVICE
}
php
-i
|
grep
opcache
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment