codeenigma / ce-dev

Dev local stack handler
4 stars 2 forks source link

When there is no `prebuilt` composer template some vital options are missing #178

Open gregharvey opened 6 months ago

gregharvey commented 6 months ago

If there's a ce-dev.compose.prebuilt.yml then it is simple copied to docker-compose.yml and all is fine, as long as your prebuilt file is correct. However, when there is only a ce-dev.compose.yml file and you run ce-dev init, it's the init.ts file that builds docker-compose.yml step by step. We have some options these days that are very important, specifically:

  # giving access to the host for local apps in macOS
  ports:
    - '3306:3306'
  # if this is missing containers cannot start
  cgroup: host
  # probably not vital, but we should set it
  platform: linux/amd64

We should make sure init.ts handles these parameters and can take them from ce-dev.compose.yml correctly, at the moment it builds docker-compose.yml files that make it impossible to start the containers if there is no prebuilt file.