|
FROM node:18-alpine |
|
|
|
ENV USER ${USER:-node} |
|
ENV USER_ID ${USER_ID:-1000} |
|
ARG ver |
|
WORKDIR /app |
|
|
|
COPY . /app |
|
|
|
RUN apk add curl wget supervisor git py3-flask |
|
|
|
|
|
RUN git clone https://github.com/DisboxApp/server && git clone https://github.com/DisboxApp/web |
|
RUN chmod -R 777 server && cd server && \ |
|
npm install |
|
RUN cd /app && chmod -R 777 web && cd web && \ |
|
npm install && cd /app |
|
RUN chmod -R 777 server && chmod -R 777 web |
|
RUN curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -o cloudflared && \ |
|
chmod +x cloudflared |
|
|
|
|
|
|
|
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 pip install Supervisor |
|
CMD /usr/bin/supervisord -c supervisor.conf |