var arr = [[ "28.06.2018", "004", "0135569", "", "" ,""],
[ "28.06.2018", "004", "0135569", "", "" ,""],
[ "28.06.2018", "004", "0135569", "", "" ,""],
[ "28.06.2018", "004", "0135569", "", "" ,""],
[ "28.06.2018", "004", "0135569", "", "" ,""]],
arr2 = [];
arr.forEach(function(col) {
col = col.filter(item => item.length > 0);
if(col.length > 0){
arr2.push(col);
}
});
console.log(arr2);
var arr = [[ "28.06.2018", "004", "0135569", "", "" ,""],
[ "28.06.2018", "004", "0135569", "", "" ,""],
[ "28.06.2018", "004", "0135569", "", "" ,""],
[ "28.06.2018", "004", "0135569", "", "" ,""],
[ "28.06.2018", "004", "0135569", "", "" ,""]],
arr2 = [];
arr.forEach(function(col) {
col = col.filter(item => item !== " ");
if(col.length > 0){
arr2.push(col);
}
});
console.log(arr2);
version: '3'
services:
web:
image: nginx:alpine
volumes:
- "./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf"
- "./etc/ssl:/etc/ssl"
- "./web:/var/www/html"
- "./etc/nginx/default.template.conf:/etc/nginx/conf.d/default.template"
ports:
- "80:80"
- "3000:443"
environment:
- NGINX_HOST=${NGINX_HOST}
command: /bin/sh -c "envsubst '$$NGINX_HOST' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
restart: always
user: "1001:1001"
depends_on:
- php
- mysqldb
php:
build:
context: .
dockerfile: DockerfilePhpWithGit
restart: always
user: "1001:1001"
volumes:
- "./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini"
- "./web:/var/www/html"
Либо так или иначе совмещать user id/group id хоста и контейнера - тут вариантов много - посмотри к примеру user у docker-composeвот, я как раз и спрашиваю про варианты. Хоть убейте, не вижу в официальной документации ключ user. Смотрю вот здесь https://docs.docker.com/compose/compose-file/
version: '3'
services:
web:
image: nginx:alpine
volumes:
- "./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf"
- "./etc/ssl:/etc/ssl"
- "./web:/var/www/html"
- "./etc/nginx/default.template.conf:/etc/nginx/conf.d/default.template"
ports:
- "80:80"
- "3000:443"
environment:
- NGINX_HOST=${NGINX_HOST}
command: /bin/sh -c "envsubst '$$NGINX_HOST' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
restart: always
depends_on:
- php
- mysqldb
php:
image: nanoninja/php-fpm:${PHP_VERSION}
restart: always
volumes:
- "./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini"
- "./web:/var/www/html"
depends_on:
- git
git:
image: alpine/git
container_name: git
volumes:
- "./web:/var/www/html"
exec("git -v 2>&1", $output);
web:
image: nginx:alpine
volumes:
- "./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf"
- "./etc/ssl:/etc/ssl"
- "./web:/var/www/html"
- "./etc/nginx/default.template.conf:/etc/nginx/conf.d/default.template"
ports:
- "80:80"
- "3000:443"
environment:
- NGINX_HOST=${NGINX_HOST}
command: /bin/sh -c "envsubst '$$NGINX_HOST' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
restart: always
depends_on:
- php
- mysqldb
php:
image: nanoninja/php-fpm:${PHP_VERSION}
restart: always
volumes:
- "./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini"
- "./web:/var/www/html"
что это информация нам дает?