wait-for-it
s6-overlay
wait-for-it | s6-overlay | |
---|---|---|
16 | 27 | |
9,008 | 3,523 | |
- | 1.1% | |
0.0 | 4.6 | |
over 1 year ago | about 1 month ago | |
Python | Shell | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
wait-for-it
- How to dockerize Node + Prisma
-
Docker Compose: how to wait for the MySQL server container to be ready?
python:3.10.5-slim-buster is a Debian GNU/Linux 10 (buster). Follow the Debian package link given by wait-for-it, we'll eventually find this link https://packages.debian.org/source/oldoldstable/wait-for-it, I downloaded the wait-for-it_0.0~git20160501.orig.tar.gz file and extracted wait-for-it.sh out to the project root directory where setup.py, app.py, .dockerignore, Dockerfile and docker-compose.yml are.
-
Docker compose nodejs mysql network doesnt wait for health checks
Using countless variations of the wait for it script (they all get ignored (yes i did chmod +x)). another candidate or using it like this
-
How to disable nginx DNS check?
I haven’t done it, but maybe you can use something like this in an ExecStartPre on the nginx systemd service, or if that doesnt work, as a separate service that nginx’s systemd service starts after
- As of 2021, what are the best practices deploying a Apache/PHP/Postgres project with Docker?
-
Podman: A tool for managing OCI containers and pods
I’ve used wait-for-it with success.
https://github.com/vishnubob/wait-for-it
-
How to deploy postgres db with go in docker-compose?
When start to build docker-compose, it tried to connect db first, but it seems that db didn't become reachable yet. Even added wait-for-it doesn't work.
-
5/28 TIL: Docker Compose, Volumes, cURL
executes 'wait-for-it.sh' to wait on the availability of port 3306 before running 'air'--using wait-for-it.sh is just an example and this shell script has to be installed as part of the Dockerfilehttps://github.com/vishnubob/wait-for-it
-
Compose service that depends on a service from another compose
Yeah dockerize seems to achieve your second suggestion, someone also suggested my wait-for-it https://github.com/vishnubob/wait-for-it which seems to be similar but a bit more popular and also used in the official documentation https://docs.docker.com/compose/startup-order/ I think I'll go this route, the first option doesn't quite match what I need as all compose aren't necessarily to be started simultaneously.
-
How to make Django fail if it cannot connect to Redis?
Can't you use something like this? : https://github.com/vishnubob/wait-for-it . Essentially wait until you can ping redis port and then run wsgi runserver for django. However, are you sure that you can resolve redis host on swarm? Redis starts so fast that it makes me think it might be something else.
s6-overlay
- S6-overlay: one *thing* per Docker container
-
Backup Grafana SQLite with Litestream using s6-overlay in a container app
FROM docker.io/grafana/grafana-oss:9.5.12-ubuntu # Set USER to root escalating priviliges to perform installation of litestream and s6-overlay USER root RUN apt-get -qq update && \ apt-get -qq install -y xz-utils \ && rm -rf /var/libs/apt/lists/* # https://github.com/benbjohnson/litestream-s6-example/blob/main/Dockerfile # Download the static build of Litestream directly into the path & make it executable. ADD https://github.com/benbjohnson/litestream/releases/download/v0.3.11/litestream-v0.3.11-linux-amd64.tar.gz /tmp/litestream.tar.gz RUN tar -C / -xvzf /tmp/litestream.tar.gz ARG S6_OVERLAY_VERSION="3.1.5.0" # Download the s6-overlay for process supervision. ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz /tmp RUN tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz # Copy s6 init & service definitions. COPY etc/s6-overlay /etc/s6-overlay # Copy Litestream configuration file. COPY etc/litestream.yml /etc/litestream.yml # The kill grace time is set to zero because our app handles shutdown through SIGTERM. ENV S6_KILL_GRACETIME=0 # Sync disks is enabled so that data is properly flushed. ENV S6_SYNC_DISKS=1 # Reset USER to 472 to reset the escalated privileges USER 472 # # Run the s6 init process on entry. ENTRYPOINT [ "/init" ]
-
Letme Dockerize for you | share your projects
Learn S6-Overlay that allows to have one docker container for multiple processes... make immich docker compose not a two page 8 containers long? But just one clean container with healthcheck. Convince the devs to switch to it.
-
Code-server : Awesome VS Code container on browser (Useful for Fast Cloud Deploy - Fix Corporate Issues)
Custom base docker image with S6 overlay (for more details : just-containers/s6-overlay)
-
xinetd/inetd/systemd socket services in Docker?
https://github.com/just-containers/s6-overlay can do what you need.
-
Alpine Linux is reducing dependencies on Busybox
Used s6-overlay[1] to start a lot daemons in a docker-image for demo purposes - postgres, tomcat, mysql, php-fpm, apache (don't ask why ;) - s6 worked really well and was reliable and stable - I enjoyed it very much. It was also possible to reliable pass SIGTERM to the daemons in the image for clean shutdown and it was easily possible to configure logging to stdout with a prefix. Modelling dependencies (waiting on database before starting app etc.pp) is possible via shell-scripts. It's super flexible but out of the box it's more like a collection of powerful tools not a complete package - but that's good. It's in the tradition of djb daemontools and is very unix - as in doesn't talk a lot and you better know how each part works but - and that's really cool - it's modular and simple and once you get a grip on it you can easily reason about it. systemd takes a completely different approach and also solves a kind of differnt problem - this is like small pieces of lego that compose well instead of one big chunk of glib/dbus/glibc only c-code.
1: https://github.com/just-containers/s6-overlay
-
Do Docker Containers go thru a Boot Process
Every container has some entrypoint, whether it launches a single binary, runs a "process supervisor" like s6, or does some pre-setup before running a service, like a database.
-
Docker and dedicated user
If you *really* want to make your own containers with PUID/PGID support checkout "S6-overlay" and the linuxserver "baseimage". Somewhere in the startup they end up running:
-
Docker Build Process: Archive Extract onto / (root), overwrites destination directories and contents
FROM ubuntu:20.04 ARG S6_OVERLAY_VERSION=3.1.0.1 ARG DEBIAN_FRONTEND=noninteractive ENV TZ="America/New_York" RUN apt-get update && apt-get install -y xz-utils ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz /tmp RUN tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz RUN apt-get autoclean && rm -rf /tmp/* ENTRYPOINT ["/init"]
-
Starting a service in Dockerfile
Not sure about unbound or what have inside the pihole base image, you may try to run the service in foreground or use some tiny init service for that container (I just learnt that s6 may work for that, but you must be aware how it should be used)
What are some alternatives?
podman-compose - a script to run docker-compose.yml using podman
docker-php-nginx - Docker image with PHP-FPM 8.3 & Nginx 1.24 on Alpine Linux
nerdctl - contaiNERD CTL - Docker-compatible CLI for containerd, with support for Compose, Rootless, eStargz, OCIcrypt, IPFS, ...
docker-restic-cron - Automated Restic backups from Docker
laravel-docker-production
podman - Podman: A tool for managing OCI containers and pods.
docker
gitlab-runner
k3s - Lightweight Kubernetes
cookiecutter-django - Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly. [Moved to: https://github.com/cookiecutter/cookiecutter-django]
tinypilot - Use your Raspberry Pi as a browser-based KVM.