Skip to content

Is there a way to disable an addon without impacting the config committed to git? #7347

Answered by stasadev
Tristan-MyAnaPro asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Tristan-MyAnaPro,

Yes, we have an option for that.

The phpmyadmin service can be defined as optional by adding this file .ddev/docker-compose.phpmyadmin_extra.yaml:

services:
  phpmyadmin:
    profiles:
      - phpmyadmin

Then edit the .ddev/commands/host/phpmyadmin file by removing the #ddev-generated line and adding this at the script start:

# Start phpmyadmin if it's not started
ddev exec -s phpmyadmin true >/dev/null 2>&1 || ddev start --profiles phpmyadmin

Commit these two files to git, and with this setup, phpmyadmin will only be started on demand by using:

ddev phpmyadmin

Remember to add ddev_version_constraint:

ddev_version_constraint: '>= v1.24.4'

to your .ddev/config.yaml

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Tristan-MyAnaPro
Comment options

Answer selected by Tristan-MyAnaPro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants