Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to react 18 and switch to maplibregl from mapboxgl #151

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .dockeringnore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*
!package.json
!public
!src
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

.idea*
47 changes: 47 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM ubuntu:22.04 as builder

USER root
RUN apt-get update && apt-get upgrade -y
RUN apt-get -y --no-install-recommends install ca-certificates wget
RUN update-ca-certificates
RUN wget -qO- https://deb.nodesource.com/setup_16.x | bash
RUN apt-get install -y nodejs
RUN npm install -g npm

WORKDIR /app

# Installs required node packages
COPY . .
RUN npm install && npm run build

# ==== Final Image
FROM ubuntu:22.04 AS final

ENV DEBIAN_FRONTEND=noninteractive

USER root

RUN groupadd --gid 1001 node \
&& useradd --uid 1001 --gid node --shell /bin/bash --create-home node \
&& set -ex \
&& apt-get update && apt-get upgrade -y \
&& apt-get -y --no-install-recommends install \
ca-certificates wget \
&& update-ca-certificates \
&& wget -qO- https://deb.nodesource.com/setup_16.x | bash \
&& apt-get install -y nodejs \
&& npm install -g npm \
&& apt-get -y remove wget \
&& apt-get -y --purge autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& npm install -g serve

USER node:node
WORKDIR /app

# Copying build output
COPY --from=builder --chown=node:node /app/build/ build

EXPOSE 3000
CMD ["serve", "-s", "-d", "-p", "3000", "--cors", "build"]
Loading