introduce VITE_HOST env var and pass it to the node watcher vite --host
This commit is contained in:
parent
970597876b
commit
bfb7e3ca40
|
@ -22,3 +22,6 @@ MOBILIZON_SMTP_PORT=25
|
|||
MOBILIZON_SMTP_USERNAME=noreply@mobilizon.lan
|
||||
MOBILIZON_SMTP_PASSWORD=password
|
||||
MOBILIZON_SMTP_SSL=false
|
||||
|
||||
# When using docker for development, VITE_HOST must be set to 0.0.0.0
|
||||
VITE_HOST=localhost
|
||||
|
|
|
@ -15,7 +15,9 @@ config :mobilizon, Mobilizon.Web.Endpoint,
|
|||
check_origin: false,
|
||||
watchers: [
|
||||
node: [
|
||||
"node_modules/.bin/vite"
|
||||
"node_modules/.bin/vite",
|
||||
"--host",
|
||||
System.get_env("VITE_HOST", "localhost")
|
||||
]
|
||||
]
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ services:
|
|||
MOBILIZON_DATABASE_DBNAME: ${POSTGRES_DB}
|
||||
MOBILIZON_DATABASE_HOST: postgres
|
||||
MOBILIZON_DATABASE_PORT: ${POSTGRES_PORT}
|
||||
VITE_HOST: ${VITE_HOST:-localhost}
|
||||
command: sh -c "mix phx.server"
|
||||
volumes:
|
||||
pgdata:
|
||||
|
|
|
@ -83,9 +83,6 @@ export default defineConfig(({ command }) => {
|
|||
return {
|
||||
plugins,
|
||||
build,
|
||||
server: {
|
||||
host: isDev ? "0.0.0.0" : "localhost",
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "./src"),
|
||||
|
|
Loading…
Reference in a new issue