-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
22aa95d
commit 165186e
Showing
18 changed files
with
163 additions
and
130 deletions.
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,5 +1,4 @@ | ||
.idea/ | ||
*/.composer | ||
*/volumes/ | ||
project/phpunit/ | ||
*/env/docker.env | ||
|
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,21 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
OWNER=$USER | ||
R=`id -Gn $USER | grep '\bwww-data\b'` | ||
|
||
if [ "$EUID" -ne 0 ]; then | ||
echo "Please run as root (sudo)" | ||
exit | ||
if [[ -z $R ]]; then | ||
sudo usermod -a -G www-data $OWNER | ||
fi | ||
|
||
if [ "${SUDO_USER}" == "root" ]; then | ||
echo "You need to run as sudo with regular user; not sudo su" | ||
exit | ||
fi | ||
sudo chown -R www-data:www-data project/var | ||
sudo chmod -R 0775 project/var | ||
|
||
chown -R 33:33 project/var/cache | ||
chown -R 33:33 project/var/logs | ||
mkdir -p project/vendor | ||
sudo chown -R www-data:www-data project/vendor | ||
sudo chmod -R 0775 project/vendor | ||
|
||
# sessions can be stored in database | ||
if [ -d "project/var/sessions" ]; then | ||
chown -R 33:33 project/var/sessions | ||
fi | ||
mkdir -p project/bin | ||
sudo chown -R www-data:www-data project/bin | ||
sudo chmod -R 0775 project/bin | ||
|
||
sudo chown -R www-data:www-data project/web | ||
sudo chmod -R 0775 project/web | ||
|
||
mkdir -p project/.composer | ||
sudo chown -R www-data:www-data project/.composer | ||
sudo chmod -R 0775 project/.composer | ||
|
||
sudo chown -R www-data:www-data project/composer.lock | ||
sudo chmod -R 0775 project/composer.lock |
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
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,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ $# != 2 ]; then | ||
echo "Provide image as first argument and tag as second" | ||
exit | ||
fi | ||
|
||
IMAGE=$1 | ||
TAG=$2 | ||
|
||
if [ ! -f ./$IMAGE/Dockerfile ]; then | ||
echo "$IMAGE/Dockerfile does not exists - cannot build" | ||
exit | ||
fi | ||
|
||
cd $IMAGE | ||
docker build . -t everlutionsk/$IMAGE | ||
docker tag everlutionsk/$IMAGE everlutionsk/$IMAGE:$TAG | ||
docker push everlutionsk/$IMAGE:$TAG |
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,4 +1,6 @@ | ||
FROM php:7.1.9-cli | ||
FROM php:7.1.12-cli | ||
|
||
MAINTAINER Ivan Barlog <[email protected]> | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
libmcrypt-dev \ | ||
|
@@ -8,7 +10,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ | |
git \ | ||
zlib1g-dev \ | ||
libpcre3-dev \ | ||
locales | ||
locales \ | ||
vim | ||
|
||
RUN docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd | ||
RUN docker-php-ext-configure mysqli --with-mysqli=mysqlnd | ||
|
@@ -21,4 +24,6 @@ RUN dpkg-reconfigure -f noninteractive locales | |
# Add composer | ||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
|
||
RUN usermod -u 1000 www-data | ||
|
||
CMD ["php", "-a"] |
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,3 +1,5 @@ | ||
FROM busybox:1.26.2-uclibc | ||
FROM busybox:1.27.2-uclibc | ||
|
||
MAINTAINER Ivan Barlog <[email protected]> | ||
|
||
volume /var/www |
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,3 +1,5 @@ | ||
FROM elasticsearch:2.4.5 | ||
|
||
MAINTAINER Ivan Barlog <[email protected]> | ||
|
||
COPY config.yml /usr/share/elasticsearch/config/elasticsearch.yml |
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,28 +1,10 @@ | ||
FROM php:7.1.9-fpm | ||
FROM everlutionsk/fpm:7.1.12 | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
libmcrypt-dev \ | ||
libicu-dev \ | ||
libcurl4-openssl-dev \ | ||
curl \ | ||
git \ | ||
libpcre3-dev \ | ||
locales | ||
|
||
RUN docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd | ||
RUN docker-php-ext-configure mysqli --with-mysqli=mysqlnd | ||
RUN docker-php-ext-install mcrypt pdo_mysql mysqli intl mbstring opcache | ||
|
||
# Reconfigure locales | ||
RUN locale-gen en_US en_US.UTF-8 sk_SK sk_SK.UTF-8 | ||
RUN dpkg-reconfigure -f noninteractive locales | ||
MAINTAINER Ivan Barlog <[email protected]> | ||
|
||
# Configure xdebug | ||
RUN pecl install xdebug | ||
RUN docker-php-ext-enable xdebug | ||
COPY ext-xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini | ||
|
||
COPY app.ini /usr/local/etc/php/conf.d/app.ini | ||
COPY app.pool.conf /usr/local/etc/php/pool.d/app.pool.conf | ||
|
||
CMD ["php-fpm"] |
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,4 +1,6 @@ | ||
FROM php:7.1.9-fpm | ||
FROM php:7.1.12-fpm | ||
|
||
MAINTAINER Ivan Barlog <[email protected]> | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
libmcrypt-dev \ | ||
|
@@ -20,4 +22,6 @@ RUN dpkg-reconfigure -f noninteractive locales | |
COPY app.ini /usr/local/etc/php/conf.d/app.ini | ||
COPY app.pool.conf /usr/local/etc/php/pool.d/app.pool.conf | ||
|
||
RUN usermod -u 1000 www-data | ||
|
||
CMD ["php-fpm"] |
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,4 +1,6 @@ | ||
FROM mysql:5.7 | ||
FROM mysql:5.7.20 | ||
|
||
MAINTAINER Ivan Barlog <[email protected]> | ||
|
||
RUN mkdir /sqldump | ||
|
||
|
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,9 +1,11 @@ | ||
FROM nginx:1.13.5 | ||
FROM nginx:1.13.7 | ||
|
||
ARG ENV=dev | ||
ARG DOMAIN=dev.symfony | ||
ARG USER=user | ||
ARG PASSWORD=password | ||
MAINTAINER Ivan Barlog <[email protected]> | ||
|
||
ARG ENV | ||
ARG DOMAIN | ||
ARG USER | ||
ARG PASSWORD | ||
|
||
ENV DOMAIN $DOMAIN | ||
ENV USER $USER | ||
|
@@ -29,5 +31,3 @@ RUN sed -i "s/{password}/$PASSWORD/g" /etc/nginx/.htpasswd | |
|
||
# Run nginx in foreground. | ||
CMD ["nginx", "-g", "daemon off;"] | ||
|
||
|
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,18 +1,22 @@ | ||
# environment - dev|stg|prod | ||
export SYMFONY_APP_ENV=dev | ||
export DOCKER_INFRASTRUCTURE_ENV=dev | ||
|
||
# port where the nginx is listening | ||
export SYMFONY_APP_PORT=80 | ||
|
||
# elasticsearch port | ||
export SYMFONY_ES_PORT=9200 | ||
|
||
# mysql port (applicable for dev environment) | ||
export SYMFONY_DB_PORT=3306 | ||
export DOCKER_NGINX_PORT=80 | ||
|
||
# domain which will be nginx listen for | ||
export SYMFONY_APP_DOMAIN=dev.symfony | ||
export NGINX_DOMAIN=dev.symfony | ||
|
||
# base auth user:password for nginx - by default needed only for stg environment | ||
export SYMFONY_BASE_AUTH_USER=user | ||
export SYMFONY_BASE_AUTH_PASSWORD=password | ||
export NGINX_BASE_AUTH_USER=user | ||
export NGINX_BASE_AUTH_PASSWORD=password | ||
|
||
# adminer | ||
export DOCKER_ADMINER_PORT=8080 | ||
|
||
# mysql | ||
export DOCKER_DB_ROOT_PASSWORD=root | ||
export DOCKER_DB_PORT=3306 | ||
|
||
# elastic | ||
export DOCKER_ES_PORT=9200 |
Oops, something went wrong.