mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-02-20 17:12:48 +00:00
Fix UI build for Docker image.
Buster provides nodejs 10 which is too old for some JS libraries.
This commit is contained in:
parent
54a1265166
commit
35457c3954
22
Dockerfile
22
Dockerfile
@ -1,13 +1,21 @@
|
||||
FROM chirpstack/chirpstack-dev-cache:latest AS development
|
||||
FROM alpine:3.15.0 AS ui-build
|
||||
|
||||
COPY . $PROJECT_PATH
|
||||
ENV PROJECT_PATH=/chirpstack
|
||||
|
||||
RUN apk add --no-cache make git bash build-base nodejs npm yarn
|
||||
|
||||
RUN mkdir -p $PROJECT_PATH
|
||||
COPY ./api/grpc-web $PROJECT_PATH/api/grpc-web
|
||||
COPY ./ui $PROJECT_PATH/ui
|
||||
|
||||
# --network-timeout as yarn throws a ESOCKETTIMEDOUT timeout with GitHub Actions
|
||||
RUN cd $PROJECT_PATH/ui && \
|
||||
yarn install --network-timeout 600000 && \
|
||||
yarn build && \
|
||||
rm -rf node_modules
|
||||
yarn build
|
||||
|
||||
FROM chirpstack/chirpstack-dev-cache:latest AS rust-build
|
||||
|
||||
COPY . $PROJECT_PATH
|
||||
COPY --from=ui-build $PROJECT_PATH/ui/build $PROJECT_PATH/ui/build
|
||||
RUN cd $PROJECT_PATH/chirpstack && cargo build --release
|
||||
|
||||
FROM debian:buster-slim as production
|
||||
@ -18,7 +26,7 @@ RUN apt-get update && \
|
||||
libpq5 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=development /target/release/chirpstack /usr/bin/chirpstack
|
||||
COPY --from=development /chirpstack/chirpstack/configuration/* /etc/chirpstack/
|
||||
COPY --from=rust-build /target/release/chirpstack /usr/bin/chirpstack
|
||||
COPY --from=rust-build /chirpstack/chirpstack/configuration/* /etc/chirpstack/
|
||||
USER nobody:nogroup
|
||||
ENTRYPOINT ["/usr/bin/chirpstack"]
|
||||
|
@ -19,13 +19,10 @@ RUN apt-get update && \
|
||||
redis-tools \
|
||||
rpm \
|
||||
clang \
|
||||
yarnpkg \
|
||||
golang-cfssl \
|
||||
jq \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN ln -s /usr/bin/yarnpkg /usr/bin/yarn
|
||||
|
||||
RUN rustup component add rustfmt clippy
|
||||
|
||||
RUN cargo install diesel_cli --no-default-features --features postgres
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "chirpstack-ui",
|
||||
"version": "4.0.0-test.1",
|
||||
"version": "4.0.0-test.4",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@ant-design/colors": "^6.0.0",
|
||||
|
@ -1881,7 +1881,7 @@
|
||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||
|
||||
"@chirpstack/chirpstack-api-grpc-web@file:../api/grpc-web":
|
||||
version "4.0.0-test.1"
|
||||
version "4.0.0-test.4"
|
||||
dependencies:
|
||||
"@types/google-protobuf" "^3.15.2"
|
||||
google-protobuf "^3.17.3"
|
||||
@ -5789,6 +5789,11 @@ grpc-web@^1.2.1:
|
||||
resolved "https://registry.yarnpkg.com/grpc-web/-/grpc-web-1.2.1.tgz#860051d705bf5baa7b81fcbd14030060bf16b7b9"
|
||||
integrity sha512-ibBaJPzfMVuLPgaST9w0kZl60s+SnkPBQp6QKdpEr85tpc1gXW2QDqSne9xiyiym0logDfdUSm4aX5h9YBA2mw==
|
||||
|
||||
grpc-web@^1.3.1:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/grpc-web/-/grpc-web-1.3.1.tgz#6d8affe75a103790b7ad570824e765a1d6a418e4"
|
||||
integrity sha512-VxyYEAGsatecAFY3xieRDzsuhm92yQBsJD7fd5Z3MY150hZWPwkrUWetzJ0QK5W0uym4+VedPQrei38wk0eIjQ==
|
||||
|
||||
gzip-size@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-6.0.0.tgz#065367fd50c239c0671cbcbad5be3e2eeb10e462"
|
||||
|
Loading…
x
Reference in New Issue
Block a user