docker-compose

Which is better to create docker-compose.yml file

随声附和 提交于 2020-01-16 19:33:05
问题 I have two web applications, all of them are visited through their domain names, nginx as their proxy, there are two methods to create docker-compose.yml file create only one docker-compose.yml file with all applications's config on it, like following webapp1: image:nodejs command: node app.js webapp2: image:nodejs command: node app.js nginx: image:nginx ports: - "80:80" depends_on: - webapp1 - webapp2 create three docker-compose.yml files, like following webapp1 webapp1: image:nodejs command

can't connect nodeJs and postgres container

天涯浪子 提交于 2020-01-16 16:32:55
问题 I am currently having some problems with docker and connecting a node project with postgres when running inside it. My docker-compose file looks like: # docker-compose.yml version: "3" services: app: build: . ports: - "49160:8080" links: - db depends_on: - db db: image: kartoza/postgis:9.6-2.4 environment: - POSTGRES_DB=mydb - POSTGRES_USER=postgres - POSTGRES_PASS=mypassword - POSTGRES_MULTIPLE_EXTENSIONS=postgis,pgrouting - ALLOW_IP_RANGE=0.0.0.0/0 volumes: - pgdata:/var/lib/postgresql/data

can't connect nodeJs and postgres container

泪湿孤枕 提交于 2020-01-16 16:31:10
问题 I am currently having some problems with docker and connecting a node project with postgres when running inside it. My docker-compose file looks like: # docker-compose.yml version: "3" services: app: build: . ports: - "49160:8080" links: - db depends_on: - db db: image: kartoza/postgis:9.6-2.4 environment: - POSTGRES_DB=mydb - POSTGRES_USER=postgres - POSTGRES_PASS=mypassword - POSTGRES_MULTIPLE_EXTENSIONS=postgis,pgrouting - ALLOW_IP_RANGE=0.0.0.0/0 volumes: - pgdata:/var/lib/postgresql/data

.Net Core API running under docker

∥☆過路亽.° 提交于 2020-01-16 10:52:07
问题 I have a project (.Net Core API) which runs under Docker for windows and have service where customers can upload files. I want to save these files on the server (for example "C:\TempFolder") but when I running project in debug mode (with docker) and creating directory dynamically from code there is an error: 'System.IO.IOException: Invalid argument..." CurrentDirectory is /app and in DirectoryInfo FullPaths value is "/app/C:\TempFolder" when I running app without docker it works fine It may

Dockerfile: added files won't be copied to volume

烂漫一生 提交于 2020-01-16 10:16:33
问题 I made a Dockerfile for a Python Script, which needs some persistent data in a volume. Problem is the files for the volume won't be in place in the container. Dockerfile: FROM python:3 COPY grab_immo /grab_immo RUN mkdir /data ADD ./data/contacts /data ADD ./data/run.log /data ADD ./data/template /data VOLUME /data WORKDIR /grab_immo RUN pip install -r requirements.txt ENV MY_ADDRESS=value \ PASSWORD=value \ SMTP_HOST=value \ SMTP_PORT=value CMD [ "python", "./main.py" ] docker-compose.yml --

Coveralls: Error- No source for in my application using Docker container

∥☆過路亽.° 提交于 2020-01-16 09:43:28
问题 I've been trying to integrate code-coverage in my Django application.. The build is successfull and all the tests are successfull but when i check coveralls.io or codecov.io there is no data.. I have searched everything, added a .coveragerc but still nothing helps. Dockerfile FROM python:3.7-alpine MAINTAINER abhie-lp ENV PYTHONUNBUFFERED 1 COPY ./requirements.txt /requirements.txt RUN apk add --update --no-cache jpeg-dev RUN apk add --update --no-cache --virtual .tmp-build-deps \ gcc libc

使用微信公众号开发模拟面试功能

﹥>﹥吖頭↗ 提交于 2020-01-16 09:38:37
最近在整理我在大厂面试以及平时工作中遇到的问题,记录在 shfshanyue/Daily-Question 中,但觉得对于时时回顾,常常复习仍然做的不够。 于是在微信公众号中开发了随机生成模拟面试的功能,由于觉得比较简单且有趣,于是分享了出来 需求 先来谈一谈需求点: 在公众号中回复面试,随机生成 N 道大厂面试题 每道面试题指向一个超链接,可以查看答案 需求很简单,如图下所示。你也可以去我的公众号 全栈成长之路 查看实现效果 内容 在大部分行业中,内容是至为重要的,有内容才会有好的服务,而技术只是整合内容的一种手段。 在本次功能开发中也是如此: 一个面试题库才是至关重要 。 为此,我在 github 上新建了一个仓库,使用 Issue 来记录我在大厂面试中所遇到的面试题及答案 每天一道面试题,有关前端,后端,devops以及软技能,促进职业成长,敲开大厂之门。 到此一步,我拥有了自己的内容,并且拥有了开箱即用的后台管理系统: github issues 数据 此时我们已经拥有了一个特殊的后台管理系统,但很遗憾,由于该管理系统的特殊性,我们并不是数据映射管理系统,而需要根据 Github Issues 来生成结构化的数据,好在我们可以使用 Github API。 Github API 现在已经全部变成了 GraphQL 接口,看来大家又需要学习一门新的技术了。关于 Github

Access a docker network during build of docker-compose v2?

微笑、不失礼 提交于 2020-01-16 09:12:26
问题 Summary Having a docker-compose.yml file that builds an image like this: services: my-service: build: context: My.VS.AppFolder networks: - my-docker networks: my-docker: external: true the defined network is only avaliable in the ENTRYPOINT . But not during build. How can I access another container on the same network my-docker during build of the Dockerfile ? Use case: Fetching NuGet packages from private repo Description of the use case I have an ASP.NET Core MVC 2.1 web application. For a

Access a docker network during build of docker-compose v2?

喜欢而已 提交于 2020-01-16 09:11:05
问题 Summary Having a docker-compose.yml file that builds an image like this: services: my-service: build: context: My.VS.AppFolder networks: - my-docker networks: my-docker: external: true the defined network is only avaliable in the ENTRYPOINT . But not during build. How can I access another container on the same network my-docker during build of the Dockerfile ? Use case: Fetching NuGet packages from private repo Description of the use case I have an ASP.NET Core MVC 2.1 web application. For a

docker-compose搭建单机多节点es + kibana

为君一笑 提交于 2020-01-16 08:58:42
docker-compose.yml配置如下: version: '2.2' services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:6.7.1 container_name: esearch environment: - cluster.name=docker-cluster - bootstrap.memory_lock=true - "ES_JAVA_OPTS=-Xms512m -Xmx512m" restart: always ulimits: memlock: soft: -1 hard: -1 nofile: soft: 65536 hard: 65536 mem_limit: 1g cap_add: - IPC_LOCK volumes: - $PWD/esdata1:/usr/share/elasticsearch/data ports: - 9200:9200 networks: - esnet elasticsearch2: image: docker.elastic.co/elasticsearch/elasticsearch:6.7.1 container_name: elasticsearch2 environment: - cluster.name