27 lines
705 B
Docker
27 lines
705 B
Docker
|
|
FROM node:20-alpine
|
||
|
|
|
||
|
|
LABEL org.opencontainers.image.source="https://github.com/sonr-io/motr-enclave"
|
||
|
|
LABEL org.opencontainers.image.description="Sonr IPFS Circuit Relay Server"
|
||
|
|
|
||
|
|
RUN apk add --no-cache git python3 make g++
|
||
|
|
|
||
|
|
WORKDIR /app
|
||
|
|
|
||
|
|
RUN git clone --depth 1 https://github.com/Permissionless-Software-Foundation/ipfs-service-provider.git .
|
||
|
|
|
||
|
|
RUN npm ci --only=production
|
||
|
|
|
||
|
|
ENV NODE_ENV=production
|
||
|
|
ENV PORT=5020
|
||
|
|
ENV ENABLE_CIRCUIT_RELAY=1
|
||
|
|
ENV IPFS_TCP_PORT=4001
|
||
|
|
ENV IPFS_WS_PORT=4003
|
||
|
|
ENV DEBUG_LEVEL=1
|
||
|
|
|
||
|
|
EXPOSE 5020 4001 4003
|
||
|
|
|
||
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
|
||
|
|
CMD wget --no-verbose --tries=1 --spider http://localhost:${PORT}/ipfs || exit 1
|
||
|
|
|
||
|
|
CMD ["npm", "start"]
|