Tag: compose

Logstash嵌套对象聚合不起作用

我有3个表格:用户,post,评论和左连接。 我试图为每个用户创build一个嵌套的对象(职位)。 我能够聚合post对象,但我也想聚集每个post对象里面的评论对象,它给了我每个评论在分离的对象,而多个评论都有相同的postID,我想结合所有发表评论一个数组。 这是我的filter: filter { mutate { rename => { "post_id" => "[posts][post_id]" "post_user" => "[posts][post_user]" "comment_id" => "[posts][comments][comment_id]" "comment_post" => "[posts][comments][comment_post]" } } aggregate { task_id => "%{user_id}" code => " map['posts'] ||= [] " push_previous_map_as_event => true } aggregate { task_id => "%{[posts][post_id]}" code => " map['posts']['comments'] ||= [] " push_previous_map_as_event => […]

configparser:不从给定path读取文件

下面是我在Eclipse中的python项目结构。 我正在使用configparser来读取settings.config文件中的一个部分。 configparser不parsing文件。 它显示没有指定的部分,但我已经正确地提到该部分。 我正在创build一个dockerfile,当我运行docker-compose文件时,path显示为 /usr/local/lib/python3.6/site-packages/MyProject-0.0.1-py3.6.egg/Publisher/settings.config MyProject -Client -__init__.py -Main.py -Publisher -domain1 -domain2 -__init__.py -config.py -callconfig.py -__init__.py -settings.config #config.py import os.path as path try: from configparser import ConfigParser except ImportError: from ConfigParser import ConfigParser # ver. < 3.0 class Config(object): def get(self, mykey): config = ConfigParser() configpath = path.join(path.split(path.dirname(path.abspath(__file__)))[0], "settings.config") print (configpath) config.read(configpath) myvalue = […]

docker-compose正试图访问proc文件

Docker-compose给了我这个错误,我不知道为什么: > docker-compose -f local.yml build Step 8/21 : RUN find . -type d -name __pycache__ -exec rm -r {} \+ —> Running in 9da1be4e2ae5 find: './proc/1/map_files': Operation not permitted find: './proc/6/map_files': Operation not permitted ERROR: Service 'base' failed to build: The command '/bin/sh -c find . -type d -name __pycache__ -exec rm -r {} […]

多个Docker从docker-compose .env文件构build参数

.env -compose的.env文件遇到了一个奇怪的问题。 我可以在我的.env文件中使用第一个variableskey = pair,但只能使用第一个variables。 这是我的文件夹结构 |- root | |- .env | |- docker-compose.yaml | |- service-1 | |- Dockerfile .ENV: GIT_TOKEN=c3e13c4e33935 DB_PWD=mypassword 泊坞窗,compose.yaml: version: '3' web-server: container_name: service-1 image: sdc/service-1:0.1 build: context: ./service-1 args: – GIT_TOKEN=$GIT_TOKEN – DB_PWD=$DB_PWD 服务-1 / Dockerfile: FROM node:boron ARG GIT_TOKEN ARG DB_PWD RUN git clone https://${GIT_TOKEN}@github.com/chrxn/sdc.git RUN echo {"database_password:" […]

HeidiSQL将不会列出我的数据库

我的postgres yaml部分看起来像这样: postgres: container_name: 'postgres' image: postgres:10.1 environment: – POSTGRES_USER=postgres – POSTGRES_PASSWORD=root – POSTGRES_DB=myids ports: – "5432:5432" networks: – app-network 然后当我使用HeidiSQL的凭据login时,我无法看到我的数据库: 有任何想法吗? 更新感谢这个答案我设法find我的数据库https://dba.stackexchange.com/a/1304使用此select: SELECT datname FROM pg_database WHERE datistemplate = false; 现在问题为什么HeidiSQL不会显示?

Docker不能同时运行cron和Rails

我已经安装了whenever使用gem的cron任务,所有的crontab工作正常。 但是,当docker启动时,它不启动cron服务。 我需要进入容器,并运行cron来运行该服务。 我跟着其他问题和他们的指示,但他们似乎并没有为我工作。 Dockerfile FROM ruby:2.3.3 # setup /app as our working directory ENV RAILS_ROOT /app RUN mkdir -p $RAILS_ROOT # Set working directory, where the commands will be ran: WORKDIR $RAILS_ROOT # Replace shell with bash so we can source files RUN rm /bin/sh && ln -s /bin/bash /bin/sh # Set debconf to […]

Docker更改.gitconfig与令牌私人回购访问

我一直在挖掘,以解决在docker构build阶段访问私有回购的问题。 似乎使用“令牌”是实现这一点最简单和合理的安全方式。 我遇到了一篇文章 ,解释这一点。 在评论中,有人build议改进以添加github令牌。 我不能在docker里面工作。 我如何更改.gitconfig并让git始终使用令牌? 该命令需要更改为使用令牌: RUN echo "[url \"git@github.com:\"]\n\tinsteadOf = https://github.com/" >> /root/.gitconfig 评论: 一个更好的方法是生成一个只读访问该回购协议,并使用类似git config –global url."https://${TOKEN}@github.com/".insteadOf "https://github.com/"的api标记git config –global url."https://${TOKEN}@github.com/".insteadOf "https://github.com/" 。 这样你不需要包装脚本或SSH主机密钥检查,也不需要烘烤你的所有访问 如果有人能帮我过桥,那将是非常棒的。 谢谢

张量:标签开始在类别训练中没有图像?

input: python tensorflow/examples/image_retraining/retrain.py –bottleneck_dir=/Potholes/bottleneck –how_many_training_steps 100 –model_dir=/Potholes/inception –output_graph=/Potholes/retrained_graph.pb –output_labels=/Potholes/retrained_labels.txt –image_dir /Potholes/Potholes/.. 使用docker进行tensorflow,训练Inception模型的上层,并在重新训练模型时获得跟随误差。

链接子域到Laravel应用程序使用Docker / Docker-compose在centos 6 vps上

我使用Docker,docker-compose和laravel创build了一个应用程序。 我想要这个应用程序在我的子域do.ine.mycompany.com。 我其实已经完成了我的子域和dns文件寿的Apacheconfiguration。 其实我有我的主域名mycompany.com在我的vps在centos 6使用Apache。 我想知道如果我可以安装我的应用程序使用docker和dockerized nginx在相同的VPS。 如果它不会与我的networking服务器有问题。 以及如何使我的子域点在我的ngnix容器?` 这是我的docker-compose.yml version: "3.1" services: redis: image: redis:alpine container_name: mobilezsv-redis mysql: image: mysql:5.7 container_name: mobilezsv-mysql working_dir: /application volumes: – ./src:/application environment: – MYSQL_ROOT_PASSWORD= – MYSQL_DATABASE= – MYSQL_USER= – MYSQL_PASSWORD= ports: – "8890:3306" webserver: image: nginx:alpine container_name: mobilezsv-webserver working_dir: /application volumes: – ./src:/application – ./phpdocker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf ports: – "8888:80" […]

运行nginx节点并使用docker letsencrypt

我试图运行docker的下面的场景,但我无法抓住几件事情。 基本上我想在同一台机器上运行 example.com,www.example.com –> Static web site api.example.com –> NodeJS server Nginx will run as load balancer and Lets encrypt certificate will be used. 这是我想出来的docker-compose.yml文件。 version: '3.1' services: load_balancer: image: jwilder/nginx-proxy ports: – 80:80 – 443:443 volumes: – /var/run/docker.sock:/tmp/docker.sock:ro – /usr/secrets/load_balancer/certs:/etc/nginx/certs:ro – html:/usr/share/nginx/html – vhost:/etc/nginx/vhost.d labels: com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true" letsencrypt_companion: image: jrcs/letsencrypt-nginx-proxy-companion volumes: – /var/run/docker.sock:/var/run/docker.sock:ro – […]