Spaces:
Paused
Paused
| FROM node:18-alpine | |
| # Install git and any other required system dependencies | |
| RUN apk add --no-cache git | |
| # Create app directory and set proper permissions first | |
| RUN mkdir -p /app && \ | |
| chown -R node:node /app | |
| # Set working directory | |
| WORKDIR /app | |
| # Clone repo as root (temporarily) | |
| RUN git clone https://github.com/EMMYHENZ-TECH/Wallet-Connect ./ | |
| # Create data directory with correct permissions | |
| RUN mkdir -p /app/data && \ | |
| chown -R node:node /app && \ | |
| chmod -R 755 /app | |
| # Install dependencies | |
| RUN npm install | |
| # Switch to non-root user (important for security) | |
| USER node | |
| # Environment variables | |
| ENV PORT=7860 | |
| ENV NODE_ENV=production | |
| EXPOSE 7860 | |
| CMD ["node", "server.js"] |