forked from evgeny-nadymov/telegram-react
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (19 loc) · 703 Bytes
/
Dockerfile
File metadata and controls
27 lines (19 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM node:14 AS build
WORKDIR /app/
# Copy over package.json and package-lock.json and install dependencies first,
# so that we don't need to re-download dependencies if they have not been modified.
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN cp -v node_modules/tdweb/dist/* public/
ARG TELEGRAM_API_ID
ENV REACT_APP_TELEGRAM_API_ID=${TELEGRAM_API_ID}
ARG TELEGRAM_API_HASH
ENV REACT_APP_TELEGRAM_API_HASH=${TELEGRAM_API_HASH}
RUN npm run build
FROM nginx:stable
WORKDIR /usr/share/nginx/html/
COPY --from=build /app/build/ .
# Hack to get around the hardcoded folder structure without requiring the user to
# go to /telegram-react in their browser
RUN ln -s . telegram-react