forked from potsda.mn/mobilizon
Merge branch 'fix-docker-development' into 'main'
Fix docker development: See merge request framasoft/mobilizon!1483
This commit is contained in:
commit
0ed48d5b0a
|
@ -22,3 +22,6 @@ MOBILIZON_SMTP_PORT=25
|
||||||
MOBILIZON_SMTP_USERNAME=noreply@mobilizon.lan
|
MOBILIZON_SMTP_USERNAME=noreply@mobilizon.lan
|
||||||
MOBILIZON_SMTP_PASSWORD=password
|
MOBILIZON_SMTP_PASSWORD=password
|
||||||
MOBILIZON_SMTP_SSL=false
|
MOBILIZON_SMTP_SSL=false
|
||||||
|
|
||||||
|
# When using docker for development, VITE_HOST must be set to 0.0.0.0
|
||||||
|
VITE_HOST=localhost
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
FROM elixir:alpine
|
FROM elixir:1.15-alpine
|
||||||
|
|
||||||
RUN apk add --no-cache inotify-tools postgresql-client file make gcc libc-dev argon2 imagemagick cmake build-base libwebp-tools bash ncurses git python3
|
RUN apk add --no-cache inotify-tools postgresql-client file make gcc libc-dev argon2 imagemagick cmake build-base libwebp-tools bash ncurses git python3 npm
|
||||||
|
|
||||||
RUN mix local.hex --force && mix local.rebar --force
|
RUN mix local.hex --force && mix local.rebar --force
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
EXPOSE 4000
|
EXPOSE 4000
|
||||||
|
EXPOSE 5173
|
||||||
|
|
|
@ -15,7 +15,9 @@ config :mobilizon, Mobilizon.Web.Endpoint,
|
||||||
check_origin: false,
|
check_origin: false,
|
||||||
watchers: [
|
watchers: [
|
||||||
node: [
|
node: [
|
||||||
"node_modules/.bin/vite"
|
"node_modules/.bin/vite",
|
||||||
|
"--host",
|
||||||
|
System.get_env("VITE_HOST", "localhost")
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ services:
|
||||||
- ".:/app"
|
- ".:/app"
|
||||||
ports:
|
ports:
|
||||||
- 4000:4000
|
- 4000:4000
|
||||||
|
- 5173:5173
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
environment:
|
environment:
|
||||||
|
@ -35,6 +36,7 @@ services:
|
||||||
MOBILIZON_DATABASE_DBNAME: ${POSTGRES_DB}
|
MOBILIZON_DATABASE_DBNAME: ${POSTGRES_DB}
|
||||||
MOBILIZON_DATABASE_HOST: postgres
|
MOBILIZON_DATABASE_HOST: postgres
|
||||||
MOBILIZON_DATABASE_PORT: ${POSTGRES_PORT}
|
MOBILIZON_DATABASE_PORT: ${POSTGRES_PORT}
|
||||||
|
VITE_HOST: ${VITE_HOST:-localhost}
|
||||||
command: sh -c "mix phx.server"
|
command: sh -c "mix phx.server"
|
||||||
volumes:
|
volumes:
|
||||||
pgdata:
|
pgdata:
|
||||||
|
|
Loading…
Reference in a new issue