-
Notifications
You must be signed in to change notification settings - Fork 729
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
Makefile update #901
Merged
Merged
Makefile update #901
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
12f9389
Add .PHONY with all commands to no check for a file
ruflin 1d32d04
Refactor Makefile to use docker as default
ruflin 87b8c38
Make the docker environment the default for all make commands
ruflin 2893c3d
Save docx file in newer format to make it pass tests again
ruflin 654072f
Use only elastica image for most commands as full environment is not …
ruflin f792282
Fix Docker variable
ruflin c160500
Set DOCKER to "" for travis
ruflin 17ecebd
Add Docker images for the data environment to make Snapshot tests wor…
ruflin 4f026a1
Merge master
ruflin a030f58
Update ansible path for snapshots and apply linting. Remove unused ch…
ruflin 9332381
Simplify snapshot path names
ruflin ae97558
Merge in master and update to elasticsearch 1.7.1
ruflin ce02afd
Simplify docker and makefile
ruflin 56327d6
Merge Makefiles
ruflin 28869ac
Change snapshot directory from /mount/ to /tmp/ to make it writable o…
ruflin 9a7bc39
Change build oder of images as elastica-image must be built after loc…
ruflin 3cdb239
Make path tmp so it works on travis
ruflin af98a25
Update image plugin for docker environment
ruflin 37c72c4
Add socket extension for udp tests
ruflin 7b0ffbe
Remove udp tests to check for default host as "localhost" will not wo…
ruflin 4606f0e
Make shutdown tests compatible with docker environment
ruflin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1,58 +1,34 @@ | ||
# PHP 6 Docker file with Composer installed | ||
FROM composer/composer | ||
FROM ruflin/elastica-dev-base | ||
|
||
RUN apt-get update | ||
RUN apt-get upgrade -y | ||
RUN apt-get install -y nano | ||
RUN apt-get install -y cloc | ||
|
||
# XSL and Graphviz for PhpDocumentor | ||
RUN apt-get install -y php5-xsl | ||
# TODO: Debian is putting the xsl extension in a different directory, should be in: /usr/local/lib/php/extensions/no-debug-non-zts-20131226 | ||
RUN echo "extension=/usr/lib/php5/20131226/xsl.so" >> /usr/local/etc/php/conf.d/xsl.ini | ||
RUN apt-get install -y graphviz | ||
|
||
|
||
RUN echo "date.timezone=UTC" >> /usr/local/etc/php/conf.d/timezone.ini | ||
|
||
# Xdebug for coverage report | ||
RUN pecl install xdebug | ||
RUN echo "zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so" >> /usr/local/etc/php/conf.d/xdebug.ini | ||
|
||
# Memcache | ||
RUN apt-get install -y php5-memcache | ||
RUN echo "extension=/usr/lib/php5/20131226/memcache.so" >> /usr/local/etc/php/conf.d/memcache.ini | ||
|
||
# Add composer bin to the environment | ||
ENV PATH=/root/composer/vendor/bin:$PATH | ||
# ENVIRONMENT Setup - Needed in this image? | ||
ENV ES_HOST elasticsearch | ||
ENV PROXY_HOST nginx | ||
|
||
# Overcome github access limits. GITHUB_OAUTH_TOKEN environment variable must be set with private token | ||
RUN composer self-update | ||
# Install depdencies | ||
WORKDIR /elastica | ||
|
||
# Install development tools | ||
RUN composer global require "phpunit/phpunit=~4.7" | ||
RUN composer global require "pdepend/pdepend=~2.0" | ||
RUN composer global require "phpmd/phpmd=~2.2" | ||
RUN composer global require "mayflower/php-codebrowser=~1.1" | ||
RUN composer global require "sebastian/phpcpd=~2.0" | ||
RUN composer global require "squizlabs/php_codesniffer=~2.3" | ||
RUN composer global require "phploc/phploc=~2.1" | ||
RUN composer global require "fabpot/php-cs-fixer=1.10.*" | ||
# Copy composer file first as this only changes rarely | ||
COPY composer.json /elastica/ | ||
|
||
ENV ELASTICA_DEV true | ||
|
||
# Documentor dependencies | ||
RUN composer global require "phpdocumentor/template-zend=~1.3" | ||
RUN composer global require "phpdocumentor/phpdocumentor=~2.8" | ||
# Set empty environment so that Makefile commands inside container do not prepend the environment | ||
ENV RUN_ENV " " | ||
|
||
# Install depdencies | ||
WORKDIR /app | ||
COPY composer.json /app/ | ||
RUN composer install | ||
# Commands are taken from Makefile. Everytime the makefile is updated, this commands is rerun | ||
RUN mkdir -p \ | ||
./build/code-browser \ | ||
./build/docs \ | ||
./build/logs \ | ||
./build/pdepend \ | ||
./build/coverage | ||
|
||
RUN composer install --prefer-source | ||
|
||
# Guzzle is not included composer.json because of PHP 5.3 | ||
RUN composer require "guzzlehttp/guzzle=~6.0" | ||
# Copy rest of the files, ignoring .dockerignore files | ||
COPY lib /elastica/lib | ||
COPY test /elastica/test | ||
COPY Makefile /elastica/ | ||
|
||
ENTRYPOINT [] | ||
|
||
ENV ES_HOST elasticsearch | ||
ENV PROXY_HOST nginx |
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
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
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,27 +1,27 @@ | ||
elastica: | ||
#build: . # In case the image must be built locally | ||
image: ruflin/elastica # comment out to build locally | ||
#build: . | ||
image: ruflin/elastica | ||
ports: | ||
- "9200:9200" | ||
volumes: | ||
- .:/app | ||
links: | ||
- nginx | ||
- elasticsearch | ||
environment: | ||
- ES_HOST=elasticsearch | ||
- PROXY_HOST=nginx | ||
elasticsearch: | ||
#build: ./env/elasticsearch/ # In case image must be built locally | ||
#build: ./env/elasticsearch/ | ||
image: ruflin/elasticsearch-elastica | ||
volumes_from: | ||
- data | ||
nginx: | ||
image: nginx | ||
volumes: | ||
- ./env/nginx/nginx.conf:/etc/nginx/nginx.conf | ||
- ./env/nginx/mime.types:/etc/nginx/mime.types | ||
ports: | ||
- "12345" | ||
- "12346" | ||
- "80" | ||
#build: ./env/nginx/ | ||
image: ruflin/nginx-elastica | ||
links: | ||
- elasticsearch | ||
# data container to share data between elasticsearch nodes for snapshot testing | ||
data: | ||
image: ruflin/elastica-data | ||
volumes: | ||
- "/tmp/backups/backup1" | ||
- "/tmp/backups/backup2" |
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,9 @@ | ||
# Data image for elasticsearch instances | ||
FROM debian:jessie | ||
MAINTAINER Nicolas Ruflin <[email protected]> | ||
|
||
RUN mkdir -p /tmp/backups/backup1 | ||
RUN mkdir -p /tmp/backups/backup2 | ||
|
||
VOLUME /tmp/backups/backup1 | ||
VOLUME /tmp/backups/backup2 |
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 @@ | ||
PHP base image for the development of Elastica. | ||
|
||
This image containts the basic setup for the development of Elastica. Part of this image are all parts which do not change often and do not need access to the source code of Elastica. The only file needed to build this image is the composer.json file in the folder `env/elastica/`. It contains a list of the global packages which are needed for the development environment like phpunit. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of targets, some of them just copypasted from ant config file that was deleted far ago :)
Which of them is actually used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually planned to clean up the .PHONY part by putting it on top of every command. Like this no "old" commands should appear here. In general I tried to reduce the number of targets we have in the makefile, but there is still quite a list :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@im-denisenko Here is the pull request for the Makefile. Have a look and merge it if you think that helps: #917