Skip to content

🐳 Docker Deployment Guide

Nexora is containerized using a high-efficiency, multi-stage Alpine Linux Docker image.


🚀 Running with Docker Compose

  1. Create a docker-compose.yml file:
yaml
version: '3.8'

services:
  nexora:
    image: ghcr.io/oryzen-ph/nexora:latest
    container_name: nexora_bot
    restart: unless-stopped
    environment:
      - NODE_ENV=production
      - DISCORD_TOKEN=${DISCORD_TOKEN}
      - DISCORD_CLIENT_ID=${DISCORD_CLIENT_ID:-866896791269933067}
      - DATABASE_URL=${DATABASE_URL}
      - COINGECKO_API_KEY=${COINGECKO_API_KEY:-}
      - ETHERSCAN_API_KEY=${ETHERSCAN_API_KEY:-}
      - BSCSCAN_API_KEY=${BSCSCAN_API_KEY:-}
      - POLYGONSCAN_API_KEY=${POLYGONSCAN_API_KEY:-}
      - CRYPTOPANIC_API_KEY=${CRYPTOPANIC_API_KEY:-}
  1. Populate your .env file in the same directory:
bash
DISCORD_TOKEN=your_token_here
DATABASE_URL=postgresql://user:pass@host:5432/dbname?schema=public
  1. Launch the container:
bash
docker compose up -d
  1. View logs:
bash
docker compose logs -f nexora

🛠️ Building Custom Docker Image

If you make modifications to the source code, you can build your own Docker image:

bash
docker build -t my-nexora:latest .
docker run -d --name nexora_bot --env-file .env my-nexora:latest