Giter Site home page Giter Site logo

Comments (8)

tyler36 avatar tyler36 commented on August 22, 2024

For things like PHP, Node, and databases, versions and types are usually stored in .ddev/config.yml
(Should the database be one level higher?)

You could also use (or compare) the output from .ddev/add-metadata/name/manifest.yaml with the ddev describe -j's services. This would only work with addons installed via ddev get, and not manually added files.

from vscode-ddev-manager.

biati-digital avatar biati-digital commented on August 22, 2024

PHP, Node and db is returned correctly, it's just for services/addons installed with ddev get. I think I can use the manifest.yaml inside addon-metadata when the project is not running. Just one doubt.

Can I assume that the service short name is just the addon name without ddev-? for example:

This is the content of .ddev/addon-metadata/ddev-buggregator/manifest.yaml

name: ddev-buggregator
repository: iljapolanskis/ddev-buggregator
version: 1.0.0
install_date: "2023-09-10T14:50:15-06:00"
project_files:
    - docker-compose.buggregator.yaml
global_files: []
removal_actions: []

and this is the content of docker-compose.buggregator.yaml

#ddev-generated
# Buggregator Server
services:
  buggregator:
    container_name: ddev-${DDEV_SITENAME}-buggregator
    hostname: ${DDEV_SITENAME}-buggregator
    image: ghcr.io/buggregator/server:latest
    expose:
      - "8000"
      - "1025"
      - "9912"
      - "9913"
    environment:
      - VIRTUAL_HOST=$DDEV_HOSTNAME
      - HTTPS_EXPOSE=8000:8000,1025:1025,9912:9912,9913:9913
    labels:
      com.ddev.site-name: ${DDEV_SITENAME}
      com.ddev.approot: $DDEV_APPROOT
    volumes:
      - ".:/mnt/ddev_config"

There is no place where the add-on defines just buggregator. Doing ddev describe -j on a running project outputs this:

CleanShot 2023-09-12 at 22 27 08

I'm currently using the shortname so I need to know if I can simply remove ddev- from the name defined in manifest.yaml so I get the same shortname that ddev returns when the project is running.

from vscode-ddev-manager.

tyler36 avatar tyler36 commented on August 22, 2024

Not entirely sure, but the "name" you highlighted seems to be the name of the docker service container.

This is different from the addon name which is declared in the addons install.yaml, which is used to populate the .ddev/addon-metadata/[addon]/manifest.yaml. This is meant to be the "human-friendly" name.

Most of the time, they will be similar if not the same. But addons can declare multiple services (XHGUI has a xhgui and mongo service). DDEV itself uses db as a generic name for the 3 databases it currenty supports.

I think the "human-friendly" name is better; parse out the ddev if you want to keep things shorter.

from vscode-ddev-manager.

biati-digital avatar biati-digital commented on August 22, 2024

Ohh, so even if I get the data from manifest.yaml it's still possible that I get a different output from ddev describe -j when the project is running.

Not sure if there's a point in getting the add-ons data from manifest.yaml, what I wanted to accomplish was that no matter if the project was running or not, the same services/add-ons were displayed in the sidebar for each project, but depending on the add-on ddev describe -j will return different "services":{... data and there's no way to get that if the project is not running (without the urls, ports, etc.).

If that's the case I'll just refresh the sidebar services when the project is started. The user will only be able to see the installed add-ons when the project is running but I think that for now it's better than nothing.

from vscode-ddev-manager.

rfay avatar rfay commented on August 22, 2024

There isn't a way to get services (or anything else) when the project isn't running. A rework of app.Describe might be worth it, but I don't think it could even work.

from vscode-ddev-manager.

biati-digital avatar biati-digital commented on August 22, 2024

@rfay Understood. For now I think we can leave it like it is, once the user starts the project the rest of services will be displayed. It's definitely not ideal (I thought it was a bug), it will be confusing for the users at first but still the number of extension installs is low to even consider a rework.

I think we should keep this in mind in case we can think of a solution. The UI it's intended to display all the information related to a project without depending on if it's running or not. If at the end it's not possible maybe we can consider removing the services from the sidebar and move the db below server in the general information? I'll have to think about this.

from vscode-ddev-manager.

rfay avatar rfay commented on August 22, 2024

Services aren't even necessarily add-ons...

from vscode-ddev-manager.

biati-digital avatar biati-digital commented on August 22, 2024

Ok, I’ll think I’ll better just remove the services completely from the sidebar and move the db with the general information.

I’ll try to think a different way to show installed add-ons/services.

from vscode-ddev-manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.