docker-compose-wait | simple script to wait for other docker images | Continuous Deployment library
kandi X-RAY | docker-compose-wait Summary
kandi X-RAY | docker-compose-wait Summary
A simple script to wait for other docker images to be started while using docker-compose
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of docker-compose-wait
docker-compose-wait Key Features
docker-compose-wait Examples and Code Snippets
Community Discussions
Trending Discussions on docker-compose-wait
QUESTION
I have been trying to connect golang container with the mysql container for nearly 5 days and every time I face the Issue about the "connection refused" problem, So I have added the Wait so that golang container wait for connection when the Mysql container is preparing itself...but adding that Wait command in docker file and docker compose file doesn't resolve anything.
This is the Error I have been facing
...ANSWER
Answered 2021-Feb-13 at 15:18In your DSN, you didn't set the port, which was changed from default 3306 -> 3305 in your docker-compose
QUESTION
I am using docker compose to run couple of service which depends on each other. Here is part of the docker-compose:
...ANSWER
Answered 2019-Nov-27 at 03:58it's not localhost
connection string.
It should be service name of backend container :
QUESTION
I'm trying to create a Django app in a docker container. The app would use a postgres db with postgis extension, which I have in another database. I'm trying to solve this using docker-compose but can not get it working.
I can get the app working without the container with the database containerized just fine. I can also get the app working in a container using a sqlite db (so a file included without external container dependencies). Whatever I do, it can't find the database.
My docker-compose file:
...ANSWER
Answered 2020-Mar-17 at 20:42you can not use localhost for the docker containers, it will be pointing to the container itself, not to the host of the containers. Instead switch to use the service name.
to fix the issue, change your env to
QUESTION
I have a script that creates text indexes in MongoDB - however if i use it with my current Dockerfile (which in turn is being called in my docker-compose file), it results in an error as Mongo hasn't fully loaded.
I've seen dependsOn
however that appears to be for a entire service. Also come across this https://github.com/ufoscout/docker-compose-wait/ however I'd like to avoid using it if there's something much simplier.
Has anyone solved this - wait for Mongo to load before RUN
?
My dockerfile
...ANSWER
Answered 2019-Nov-11 at 07:12RUN mongo this script will not work, remember
RUN
command is for installation and configuration not to interact with Database or start the process. you should start the process in CMD or entrypoint.
one way to use offical image or clone the offical repo and take the benefit from offical docker image entrypoint. why reinvent the wheel?
Wit offical image all you need
QUESTION
I have a 'discovery first' setup with Eureka, Config Server, and my client.
The issue is that these 3 services start in order, but the client-server seems to register too early, and can never find config-server. I've tried a third-party library that allows a wait until config-server:8888 is available, but that doesn't always seem to work either. It's similar to a race condition.
The workaround is that if I docker restart
the client-server after everything is up, it registers and finds config-server just fine.
First run of docker-compose
:
ANSWER
Answered 2019-Sep-04 at 16:33Service dependency are always tricky when using docker-compose.
Your solution is acceptable because "there is no other way". To avoid third-part libs, this is what I do in the same scenario:
In the Dockerfile I add netcat-openbsd
, a bash file I call entrypoint
and the application jar and then I run the entrypoint.sh.
QUESTION
I'm trying to run this dockerfile:
...ANSWER
Answered 2019-Jul-23 at 18:29Apparently windows build agents use Docker for Windows by default (and Ubuntu agents use Docker for Linux). There's no easy way to specify in a dockerfile or docker-compose file which OS you require for a container (that I know of). I was able to repo the path issue by switching to Windows containers locally. To address the problem on Azure DevOps I switched my vm to ubuntu and modified my build script to work with linux (still in progress, but not related to this question).
QUESTION
I have a main repository which contains a NPM package that loads another private NPM package, both sitting on the same organization in Gitlab.
I've been researching for hours on this and found many ways it doesn't work. First off here is the Dockerfile that contains the, like I think, most common way to add my SSH key.
...ANSWER
Answered 2019-Feb-26 at 14:36With docker 1809+ you can use the new Dockerfile syntax to directly mount your ssh folder into the container.
There is an example very similar to your need in the documentation.
Copied from there and adapted to your use case :
QUESTION
I want to be able to restart a golang docker file on failure to connect to rabbitmq as outined here: (Docker Compose wait for container X before starting Y see answer by: svenhornberg). Unfortunately my golang container will exit but never restart and I don't know why.
Docker-compose:
...ANSWER
Answered 2019-Feb-18 at 02:47The Docker documentation says:
A restart policy only takes effect after a container starts successfully. In this case, starting successfully means that the container is up for at least 10 seconds and Docker has started monitoring it. This prevents a container which does not start at all from going into a restart loop.
Since the Go code you show exits basically immediately, it never meets this 10-second-minimum rule.
You can force Go to wait until the process has been alive a minimum of 10 seconds by using time.After somewhat like:
QUESTION
I'm trying to dockerize my API, but when I start the application with docker-compose file, the mongodb doesn't starts, and the application cannot connect to the database. By running the application tests using docker, the tests run correctly, but when running npm run production, the mongodb service starts and deactivates.
docker-compose.yml
...ANSWER
Answered 2018-Dec-29 at 17:51The problem should be that when the server starts, the db is not created yet. You need a script to ensure the server only starts after the database is created.
To more information you have this link https://docs.docker.com/compose/startup-order/
Or a repo that I created with that problem https://github.com/PedroS11/node-postgres-redis-docker
QUESTION
I want to run RabbitMQ in one container, and a worker process in another. The worker process needs to access RabbitMQ.
I'd like these to be managed through docker-compose
.
This is my docker-compose.yml
file so far:
ANSWER
Answered 2018-Oct-28 at 14:12Maybe you dont need to expose/map the ports on the host if you are just accessing the service from another container.
From the documentation:
Expose Expose ports without publishing them to the host machine - they’ll only be accessible to linked services. Only the internal port can be specified.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install docker-compose-wait
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page