-
Notifications
You must be signed in to change notification settings - Fork 6
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
Rafael Grigorian
committed
Aug 15, 2018
1 parent
dc118d1
commit d95e274
Showing
21 changed files
with
6,157 additions
and
9 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
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,108 @@ | ||
version: "2" | ||
|
||
volumes: | ||
database: | ||
app-sync: | ||
external: true | ||
networks: | ||
default: | ||
driver: bridge | ||
ipam: | ||
config: | ||
- subnet: "192.168.7.0/28" | ||
services: | ||
php-fpm: | ||
image: jetrails/magento-alpine:php-fpm-5.6 | ||
restart: unless-stopped | ||
volumes: | ||
- app-sync:/var/www/html:rw | ||
networks: | ||
default: | ||
aliases: | ||
- php-fpm.docker.internal | ||
environment: | ||
- VERBOSE=true | ||
expose: | ||
- "9000" | ||
links: | ||
- mysql | ||
- redis | ||
php-cli: | ||
image: jetrails/magento-alpine:php-cli-5.6 | ||
volumes: | ||
- app-sync:/var/www/html:rw | ||
networks: | ||
default: | ||
aliases: | ||
- php-cli.docker.internal | ||
links: | ||
- mysql | ||
- redis | ||
php-cron: | ||
image: jetrails/magento-alpine:php-cron-5.6 | ||
restart: unless-stopped | ||
volumes: | ||
- app-sync:/var/www/html:rw | ||
networks: | ||
default: | ||
aliases: | ||
- php-cron.docker.internal | ||
environment: | ||
- VERBOSE=false | ||
links: | ||
- mysql | ||
- redis | ||
nginx: | ||
image: jetrails/magento-alpine:nginx | ||
restart: unless-stopped | ||
volumes: | ||
- app-sync:/var/www/html:rw | ||
networks: | ||
default: | ||
aliases: | ||
- nginx.docker.internal | ||
environment: | ||
- VERBOSE=true | ||
- MAGENTO_VERSION=1 | ||
links: | ||
- php-fpm | ||
ports: | ||
- "443:443" | ||
mysql: | ||
image: jetrails/magento-alpine:mysql | ||
restart: unless-stopped | ||
volumes: | ||
- database:/var/lib/mysql | ||
networks: | ||
default: | ||
aliases: | ||
- localhost | ||
- mysql.docker.internal | ||
environment: | ||
- VERBOSE=false | ||
- MYSQL_ROOT_PASSWORD=magento | ||
- MYSQL_USER_NAME=magento | ||
- MYSQL_USER_PASSWORD=magento | ||
- MYSQL_DATABASE=magento | ||
varnish: | ||
image: jetrails/magento-alpine:varnish | ||
restart: unless-stopped | ||
environment: | ||
- VERBOSE=false | ||
networks: | ||
default: | ||
aliases: | ||
- varnish.docker.internal | ||
links: | ||
- nginx | ||
ports: | ||
- "80:80" | ||
redis: | ||
image: jetrails/magento-alpine:redis | ||
restart: unless-stopped | ||
networks: | ||
default: | ||
aliases: | ||
- redis.docker.internal | ||
environment: | ||
- VERBOSE=false |
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,8 +1,16 @@ | ||
#!/usr/bin/env sh | ||
|
||
if [[ "$MAGENTO_VERSION" != "1" ]] && [[ "$MAGENTO_VERSION" != "2" ]]; then | ||
echo "Valid value for MAGENTO_VERSION is not found ... using default value 2" | ||
MAGENTO_VERSION="2" | ||
fi | ||
|
||
if [[ "$VERBOSE" == "true" ]]; then | ||
mkdir -p /var/log/nginx | ||
touch /var/log/nginx/error.log /var/log/nginx/access.log | ||
tail -f /var/log/nginx/*.log & | ||
fi | ||
|
||
cp "/etc/nginx/available.d/magento-$MAGENTO_VERSION.conf" "/etc/nginx/conf.d/http.conf" | ||
chown -R nginx:nginx /var/www | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
server { | ||
listen 8080 default_server; | ||
listen [::]:8080 default_server; | ||
|
||
root /var/www/html; | ||
index index.html index.php; | ||
|
||
access_log /var/log/nginx/access.log; | ||
error_log /var/log/nginx/error.log; | ||
|
||
location / { | ||
try_files $uri $uri/ @handler; | ||
expires 30d; | ||
} | ||
location /app/ { deny all; } | ||
location /downloader/ { deny all; } | ||
location /includes/ { deny all; } | ||
location /lib/ { deny all; } | ||
location /media/downloadable/ { deny all; } | ||
location /pkginfo/ { deny all; } | ||
location /report/config.xml { deny all; } | ||
location /rss/ { deny all; } | ||
location /var/ { deny all; } | ||
|
||
location /var/export/ { | ||
auth_basic "Restricted"; | ||
auth_basic_user_file htpasswd; | ||
autoindex on; | ||
} | ||
location /. { | ||
return 404; | ||
} | ||
|
||
location @handler { | ||
rewrite / /index.php; | ||
} | ||
|
||
location ~ .php/ { | ||
rewrite ^(.*.php)/ $1 last; | ||
} | ||
|
||
location ~ \.php$ { | ||
try_files $uri =404; | ||
expires off; | ||
fastcgi_read_timeout 900s; | ||
fastcgi_index index.php; | ||
fastcgi_pass php-fpm.docker.internal:9000; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
include /etc/nginx/fastcgi_params; | ||
} | ||
rewrite ^/minify/([0-9]+)(/.*.(js|css))$ /lib/minify/m.php?f=$2&d=$1 last; | ||
rewrite ^/skin/m/([0-9]+)(/.*.(js|css))$ /lib/minify/m.php?f=$2&d=$1 last; | ||
|
||
location /lib/minify/ { | ||
allow all; | ||
} | ||
gzip on; | ||
gzip_min_length 1000; | ||
gzip_proxied any; | ||
gzip_types text/plain application/xml text/css text/js application/x-javascript; | ||
} |
File renamed without changes.
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,44 @@ | ||
FROM alpine:3.6 | ||
LABEL maintainer development@jetrails.com | ||
|
||
RUN apk --update --no-cache add \ | ||
shadow \ | ||
curl \ | ||
vim \ | ||
git \ | ||
tree \ | ||
php5 \ | ||
php5-bcmath \ | ||
php5-cli \ | ||
php5-ctype \ | ||
php5-curl \ | ||
php5-dom \ | ||
php5-gd \ | ||
php5-iconv \ | ||
php5-intl \ | ||
php5-json \ | ||
php5-mcrypt \ | ||
php5-mysql \ | ||
php5-openssl \ | ||
php5-pdo \ | ||
php5-pdo_mysql \ | ||
php5-phar \ | ||
php5-soap \ | ||
php5-xml \ | ||
php5-xsl \ | ||
php5-zip \ | ||
php5-zlib | ||
|
||
RUN addgroup -g 1000 magento && \ | ||
adduser -D -S -G magento -u 1000 -s /bin/sh magento | ||
|
||
RUN ln -s "$(which php5)" "$(dirname $(which php5))/php" && \ | ||
curl --silent --show-error https://getcomposer.org/installer | php && \ | ||
mv composer.phar /usr/bin/composer | ||
|
||
COPY ./conf/php.ini /etc/php5/php.ini | ||
COPY ./conf/aliases.sh /etc/profile.d/aliases.sh | ||
|
||
USER magento | ||
WORKDIR /var/www/html | ||
ENTRYPOINT [ "sh", "-l" ] |
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,2 @@ | ||
alias ll='ls -la --color' | ||
alias magento='chmod +x ./mage && ./mage' |
Oops, something went wrong.