Reputation: 23
I want to set up a ddev (v1.5.2) project without a database. When I try to overwrite the image in a Docker-Compose YAML it stops with an error.
As suggested for the dba I have overwritten the db image in an additional docker-compose.database.yaml
in the .ddev
folder.
version: '3.6'
services:
db:
image: "busybox"
I expected it to start without the database and it does, but it seems to do a health check for the database which fails.
Failed to start sitzplan: db container failed: log=, err=container exited, please use 'ddev logs -s db` to find out why it failed
The project is running, but it's not working, because it won't run my post-start hooks, which are necessary. In that means I can't even ignore the error.
Upvotes: 1
Views: 2063
Reputation: 12785
First, note that there's now explicit support for just turning off the dba/phpmyadmin container, omit_containers: dba
(can also be done in the global ddev config, ~/.ddev/global_config.yaml).
And of course I would recommend just letting the regular db container run and not using it.
But here's a docker-compose.database.yaml that does what you ask for:
version: '3.6'
services:
db:
image: "busybox:latest"
command: sh -c "while true; do sleep 1000; done"
healthcheck:
test: ["CMD", "true"]
Upvotes: 1