File size: 941 Bytes
e9b2f99
6ae6c08
e9b2f99
6ae6c08
e28f4a4
 
 
 
 
05fca73
6ae6c08
e9b2f99
 
 
 
e28f4a4
6ae6c08
 
 
e9b2f99
 
 
 
6ae6c08
e9b2f99
 
6ae6c08
 
 
e28f4a4
05fca73
6ae6c08
e9b2f99
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
31
32
33
FROM node:18-alpine

ENV USER ${USER:-node}
ENV USER_ID ${USER_ID:-1000}

WORKDIR /app

COPY . /app

RUN apk add curl wget supervisor git py3-flask

RUN git clone https://github.com/Harry-zklcdc/BingAPI-Demo.git && \
    cd BingAPI-Demo && \
    npm install && \
    npm run build 

RUN curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -o cloudflared && \
    chmod +x cloudflared

RUN curl -L https://github.com/Harry-zklcdc/go-proxy-bingai/releases/latest/download/go-proxy-bingai-linux-amd64.tar.gz -o go-proxy-bingai-linux-amd64.tar.gz && \
    tar -xvf go-proxy-bingai-linux-amd64.tar.gz && \
    chmod +x go-proxy-bingai && \
    rm go-proxy-bingai-linux-amd64.tar.gz

RUN mkdir -p /var/run/supervisor /var/log/supervisor 
RUN chown "${USER_ID}:${USER_ID}" /var/run/supervisor /var/log/supervisor
RUN chmod 777 /tmp

USER $USER

EXPOSE 5000

CMD /usr/bin/supervisord -c supervisor.conf