make vite server reachable from outside the container

[fix #1225] https://framagit.org/framasoft/mobilizon/-/issues/1225
This commit is contained in:
summersamara 2023-05-16 20:57:06 +02:00
parent d52dc72f9a
commit f887455d66
3 changed files with 5 additions and 0 deletions

View file

@ -7,3 +7,4 @@ RUN mix local.hex --force && mix local.rebar --force
WORKDIR /app
EXPOSE 4000
EXPOSE 5173

View file

@ -19,6 +19,7 @@ services:
- ".:/app"
ports:
- 4000:4000
- 5173:5173
depends_on:
- postgres
environment:

View file

@ -30,6 +30,9 @@ export default defineConfig(({ command }) => {
}),
visualizer(),
],
server: {
host: (isDev ? "0.0.0.0" : "localhost")
},
build: {
manifest: true,
outDir: path.resolve(__dirname, "../priv/static"),