File size: 778 Bytes
edd13b8
517bcf7
 
 
 
1f7732b
 
 
 
edd13b8
 
517bcf7
 
f0c45ed
517bcf7
4a62786
517bcf7
 
edd13b8
517bcf7
 
 
 
 
 
 
 
 
 
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
28
29
30
FROM node:18-bullseye-slim as build
# We use fixed placeholders that entrypoint.sh will replace
ENV REACT_APP_TG_API_ID=999123456789
ENV REACT_APP_TG_API_HASH=REPLACE_ME_API_HASH_PLACEHOLDER

# Memory optimizations to prevent OOM
ENV NODE_OPTIONS="--max-old-space-size=2048"
ENV GENERATE_SOURCEMAP=false

# Install build deps for Debian
RUN apt-get update && apt-get install -y git python3 make g++ openssl

WORKDIR /apps
RUN git clone --depth 1 https://github.com/AlexaInc/teledrive.git .

RUN yarn install --network-timeout 1000000 --ignore-engines
RUN yarn workspaces run build

FROM node:18-bullseye-slim
WORKDIR /apps
COPY --from=build /apps .

# Runtime environment variables
ENV PORT=7860
EXPOSE 7860

RUN chmod +x /apps/entrypoint.sh

ENTRYPOINT ["/apps/entrypoint.sh"]