Closed mandrasch closed 2 years ago
@johndwells thoughts?
@khalwat @mandrasch Interesting. The premise seems right, I'd just like to test this with real values to verify the approach.
Based on the comment @mandrasch linked in his original, this indeed seems to work just fine:
# ./ddev/docker-compose.vite.yaml
version: '3.6'
services:
web:
expose:
- '3000'
environment:
- HTTP_EXPOSE=${DDEV_ROUTER_HTTP_PORT}:80,${DDEV_MAILHOG_PORT}:8025,3001:3000
- HTTPS_EXPOSE=${DDEV_ROUTER_HTTPS_PORT}:80,${DDEV_MAILHOG_HTTPS_PORT}:8025,3000:3000
Did you want to PR that change to the docs @johndwells ?
I updated the docs to reflect this change
Hey,
I found your example configuration for DDEV in https://nystudio107.com/docs/vite/#using-ddev while research for DDEV + vite.
Just wanted to let you know that I had a quick discussion with Randy Fay about the docker-compose file:
He suggested using
expose
instead ofports
:(Official docs on this: https://ddev.readthedocs.io/en/stable/users/extend/custom-compose-files/#docker-composeyaml-examples, ports uses host computer, expose uses DDEV router instead)
Disclaimer: I'm not a craft dev myself, just strongly interested in vite + DDEV (https://github.com/mandrasch/ddev-addon-simple-vite).
Much success with your project and best regards, Matthias