-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.viteserve.yaml
25 lines (25 loc) · 1.19 KB
/
docker-compose.viteserve.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ddev-generated
# Override the web container's standard HTTP_EXPOSE and HTTPS_EXPOSE
# Derived from the browsersync addition.
# This is to expose the vite dev port.
version: '3.6'
services:
web:
expose:
# needed so the upstream works:
- ${VITE_PRIMARY_PORT:-5173}
environment:
# Set the vite-enabled js project here.
# Actual settings are pulled from .ddev/.env, and
# should be changed there, and not here.
- VITE_PROJECT_DIR=${VITE_PROJECT_DIR:-frontend}
- VITE_PRIMARY_PORT=${VITE_PRIMARY_PORT:-5173}
- VITE_SECONDARY_PORT=${VITE_SECONDARY_PORT:-5273}
- VITE_JS_PACKAGE_MGR=${VITE_JS_PACKAGE_MGR}
# Expose the vite dev server's port (default 5173) here.
# The odd port swap below is required so we do not need
# to play with HMR settings due to different internal
# and external ports. DDEV won't let us expose just HTTPS,
# so a bit of trickery is required.
- HTTP_EXPOSE=${DDEV_ROUTER_HTTP_PORT}:80,${DDEV_MAILHOG_PORT}:8025,${VITE_SECONDARY_PORT:-5273}:${VITE_PRIMARY_PORT:-5173}
- HTTPS_EXPOSE=${DDEV_ROUTER_HTTPS_PORT}:80,${DDEV_MAILHOG_HTTPS_PORT}:8025,${VITE_PRIMARY_PORT:-5173}:${VITE_PRIMARY_PORT:-5173}