KhaledSharif / cesium-satellites

View the orbit of satellites in a Cesium viewer, derived from a two line element list
Apache License 2.0
61 stars 19 forks source link

Needs updating #4

Open liamh opened 1 year ago

liamh commented 1 year ago

I get numerous warnings/errors due to what appears to be obsolete packages/definitions/usages. While knowing almost nothing about js and how to load it, I have modified the Dockerfile as follows

FROM nginx:stable
RUN  apt update && apt install -y curl gnupg wget
RUN  curl -sL https://deb.nodesource.com/setup_19.x | bash -
RUN  apt install -y nodejs
RUN  mkdir /frontend && mkdir /frontend/src && mkdir /frontend/dist
ADD  src /frontend/src/
COPY package.json /frontend
COPY webpack.config.js /frontend
RUN  cd /frontend && npm install --legacy-peer-deps file-loader && npm run build
RUN  cp -r /frontend/dist/* /usr/share/nginx/html
ENTRYPOINT \
     wget -P /usr/share/nginx/html http://celestrak.com/NORAD/elements/stations.txt \
     && nginx -g "daemon off;"

This gets perhaps a hundred or more warnings and at least two errors. With a very wild guess I'd say that the webpack.node.js needs to be overhauled, but I haven't the slightest idea how to do that.