docker-compose

how to run mongodb replica set in docker compose

懵懂的女人 提交于 2020-07-09 04:54:35
问题 I have tried to run mongodb replicaSet in local with mongoldb-community in my Mac I follow mongodb doc I can run it by this command mongod --port 27017 --dbpath /usr/local/var/mongodb --replSet rs0 --bind_ip localhost,127.0.0.1 but it doesn't run on background, so every time I want to start replica set mongodb I should run that command, before I run it I should stop mongo first, then on the next tab console I should run mongo --eval "rs.initiate()" to create to replicaSet again here is my

how to run mongodb replica set in docker compose

て烟熏妆下的殇ゞ 提交于 2020-07-09 04:53:21
问题 I have tried to run mongodb replicaSet in local with mongoldb-community in my Mac I follow mongodb doc I can run it by this command mongod --port 27017 --dbpath /usr/local/var/mongodb --replSet rs0 --bind_ip localhost,127.0.0.1 but it doesn't run on background, so every time I want to start replica set mongodb I should run that command, before I run it I should stop mongo first, then on the next tab console I should run mongo --eval "rs.initiate()" to create to replicaSet again here is my

Setting up Xdebug with Docker Compose and WordPress image

安稳与你 提交于 2020-07-07 05:25:44
问题 I am trying to set up Xdebug with docker-compose. I'm using PhpStorm IDE and the Docker image I'm using installs PHP 7.2. I'm trying to do this within the context of this WordPress image. Here is my current docker-compose.yml file: version: '3' services: db: image: mysql:5.7 ports: - "3306:3306" volumes: - db_data:/var/lib/mysql restart: always environment: MYSQL_ROOT_PASSWORD: somewordpress MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: wordpress web-build-scripts: build: .

How can I ping other containers in a docker network through their hostname?

半城伤御伤魂 提交于 2020-07-06 09:09:12
问题 I have a simple docker-compose set up as follows. version: "3" services: main: image: python:3.5.2 entrypoint: /usr/bin/yes network_mode: bridge another: image: python:3.5.2 entrypoint: /usr/bin/yes network_mode: bridge If I run and try to ping the other container, I get the following output. $ docker-compose up -d Recreating dockerplayground_main_1 ... Recreating dockerplayground_another_1 ... done $ docker-compose ps Name Command State Ports -------------------------------------------------

Mounted volume is empty inside container

一个人想着一个人 提交于 2020-07-06 07:07:09
问题 I've got a docker-compose.yml like this: db: image: mongo:latest ports: - "27017:27017" server: image: artificial/docker-sails:stable-pm2 command: sails lift volumes: - server/:/server ports: - "1337:1337" links: - db server/ is relative to the folder of the docker-compose.yml file. However when I docker exec -it CONTAINERID /bin/bash and check /server it is empty. What am I doing wrong? 回答1: Try using: volumes: - ./server:/server instead of server/ -- there are some cases where Docker doesn

How to do a simple edit in elasticsearch.yml in a docker container?

故事扮演 提交于 2020-07-05 12:34:50
问题 I am using docker-compose as in https://github.com/davidefiocco/dockerized-elasticsearch-indexer/blob/master/docker-compose.yml to initialize a containerized elasticsearch index. Now, I would like to set a larger value for indices.query.bool.max_clause_count than the default setting using a elasticsearch.yml config file. So far I tried to add in the docker-compose.yml a volume with: services: elasticsearch: volumes: - ./elasticsearch/config/elasticsearch.yml (and variations thereof) trying to

How to do a simple edit in elasticsearch.yml in a docker container?

本秂侑毒 提交于 2020-07-05 12:33:13
问题 I am using docker-compose as in https://github.com/davidefiocco/dockerized-elasticsearch-indexer/blob/master/docker-compose.yml to initialize a containerized elasticsearch index. Now, I would like to set a larger value for indices.query.bool.max_clause_count than the default setting using a elasticsearch.yml config file. So far I tried to add in the docker-compose.yml a volume with: services: elasticsearch: volumes: - ./elasticsearch/config/elasticsearch.yml (and variations thereof) trying to

Connecting to MySQL from Flask Application using docker-compose

不羁岁月 提交于 2020-07-05 08:19:30
问题 I have an application using Flask and MySQL. The application does not connect to MySQL container from the Flask Application but it can be accessed using Sequel Pro with the same credentials. Docker Compose File version: '2' services: web: build: flask-app ports: - "5000:5000" volumes: - .:/code mysql: build: mysql-server environment: MYSQL_DATABASE: test MYSQL_ROOT_PASSWORD: root MYSQL_ROOT_HOST: 0.0.0.0 MYSQL_USER: testing MYSQL_PASSWORD: testing ports: - "3306:3306" Docker file for MySQL

Docker Compose failed to build - Filesharing has been cancelled

南笙酒味 提交于 2020-07-04 20:20:29
问题 I've ran into an issue with Docker Desktop, currently im running the edge version as a user on Stackoverflow. Before I got the drive not shared for unknown reason error which was "solved" by installing edge version: Docker for Windows: Drive sharing failed for an unknown reason Now that this was installed im getting this new error which prevents some containers from being built. These containers have all been tested and works on several other systems. Currently 3 out of 4 containers are not

docker-compose, run a script after container has started?

半腔热情 提交于 2020-07-04 06:28:31
问题 I have a service that I am bringing up through Rancher via docker-compose. The issue I am running into is that I need to set a password after the container has been deployed. The way rancher secrets work, is that I set my secret in and rancher will mount a volume on my container with a file containing my secret. I was hoping to be able to execute a script to grab that secret, and set it as a password on my config file. I don't believe I have a way to get that secret in through the Dockerfile