fix(docker): standardize environment variable definitions for Leptos configuration
This commit is contained in:
parent
462048db2f
commit
8cfef276df
2 changed files with 8 additions and 1 deletions
|
@ -8,4 +8,8 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- RUST_LOG=info
|
- RUST_LOG=info
|
||||||
- LEPTOS_ENV=production
|
- LEPTOS_ENV=production
|
||||||
|
- LEPTOS_SITE_ADDR=0.0.0.0:3004
|
||||||
|
- LEPTOS_SITE_ROOT=site
|
||||||
|
- LEPTOS_OUTPUT_NAME=compareware
|
||||||
|
- LEPTOS_OPTIONS={"site_addr":"0.0.0.0:3004"}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
|
@ -28,6 +28,8 @@ COPY . .
|
||||||
RUN rustup target add wasm32-unknown-unknown
|
RUN rustup target add wasm32-unknown-unknown
|
||||||
# Build project
|
# Build project
|
||||||
ENV LEPTOS_OUTPUT_NAME="compareware"
|
ENV LEPTOS_OUTPUT_NAME="compareware"
|
||||||
|
ENV LEPTOS_SITE_ADDR="0.0.0.0:3004"
|
||||||
|
ENV LEPTOS_SITE_ROOT="site"
|
||||||
|
|
||||||
# Build with release profile
|
# Build with release profile
|
||||||
RUN cargo leptos build --release
|
RUN cargo leptos build --release
|
||||||
|
@ -51,6 +53,7 @@ COPY assets /app/assets
|
||||||
# Configure container, expose port and set entrypoint
|
# Configure container, expose port and set entrypoint
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
EXPOSE 3004
|
EXPOSE 3004
|
||||||
ENV LEPTOS_SITE_ADDR=0.0.0.0:3004
|
ENV LEPTOS_SITE_ADDR="0.0.0.0:3004"
|
||||||
ENV LEPTOS_SITE_ROOT="site"
|
ENV LEPTOS_SITE_ROOT="site"
|
||||||
|
ENV LEPTOS_OPTIONS='{"site_addr":"0.0.0.0:3004"}'
|
||||||
CMD ["./compareware"]
|
CMD ["./compareware"]
|
Loading…
Add table
Reference in a new issue