beyondcode / herd-community

91 stars 1 forks source link

[Bug]: herd.yml configuration creates root project under folder name, not name in Yaml file #1095

Closed csoutham closed 4 weeks ago

csoutham commented 1 month ago

Platform

macOS

Operating system version

15.1 Beta (24B5077a)

System architecture

ARM64 (M1, M2, etc)

Herd Version

1.11.1

PHP Version

No response

Bug description

I have switched from Valet to Herd, without migrating - complete fresh installation.

When creating a new project site within Herd using the herd.yml configuration file, Herd also creates a site for the project folder, which is problematic for any work that has a folder with the same name.

For instance if I was to build multiple Todo apps for clients, and have a client folder with each app inside a folder called Todos - I can only create one site within Herd.

An example configuration from a site within a folder called Todos:

name: client1-todos
php: '8.3'
secured: true
aliases:
  - api.client1-todos
  - frontend.client1-todos
services:
  mysql:
    version: 8.0.36
    port: '${DB_PORT}'
  redis:
    version: 7.0.0
    port: '${REDIS_PORT}'
integrations:
  forge: { }

Herd will run when calling herd init and create three sites

This is quite frustrating and unworkable, as if I try and add client2 with a folder called Todos, then Herd will fail.

Is there anyway to not create the unnecessary root folder with a flag in the herd.yml?

Steps to reproduce

No response

Relevant log output

No response

mpociot commented 1 month ago

Right, that's currently the default behavior as Herd parked sites (like Valet) by default use the folder name as the application name 🤔 I think it might make sense to change this behavior when using a herd.yml file so that we only use the name specified in the yaml. This will be changed in the next update.

mpociot commented 4 weeks ago

This is now fixed with Herd 1.11.2