1
0
forked from boos/BoosAPI

chore: initialize clean metapi repository

This commit is contained in:
cita
2026-02-28 00:36:28 +08:00
commit 2ecc23730d
199 changed files with 46078 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
# Meta API Hub - Environment Variables
# Copy this file to .env and fill in your values
# cp .env.example .env
# Admin authentication token (required, change this!)
AUTH_TOKEN=change-me-admin-token
# Proxy API token used for OpenAI-compatible proxy endpoint (required, change this!)
PROXY_TOKEN=change-me-proxy-sk-token
PORT=4000
NOTIFY_COOLDOWN_SEC=300
ADMIN_IP_ALLOWLIST=
# Auto check-in cron (default: 8:00 AM every day)
CHECKIN_CRON=0 8 * * *
# Balance refresh cron (default: every hour)
BALANCE_REFRESH_CRON=0 * * * *
View File
+27
View File
@@ -0,0 +1,27 @@
FROM node:20-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./
COPY --from=builder /app/drizzle ./drizzle
RUN mkdir -p /app/data
EXPOSE 4000
ENV NODE_ENV=production
ENV DATA_DIR=/app/data
CMD ["sh", "-c", "node dist/server/db/migrate.js && node dist/server/index.js"]
+9
View File
@@ -0,0 +1,9 @@
# docker-compose.override.yml
# This file is automatically picked up by Docker Compose during local development.
# It overrides the image reference in docker-compose.yml with a local build.
services:
metapi:
image: ~
build:
context: ..
dockerfile: docker/Dockerfile
+16
View File
@@ -0,0 +1,16 @@
services:
metapi:
image: 1467078763/metapi:latest
ports:
- "4000:4000"
volumes:
- ./data:/app/data
environment:
AUTH_TOKEN: ${AUTH_TOKEN:?AUTH_TOKEN is required}
PROXY_TOKEN: ${PROXY_TOKEN:?PROXY_TOKEN is required}
CHECKIN_CRON: "0 8 * * *"
BALANCE_REFRESH_CRON: "0 * * * *"
PORT: ${PORT:-4000}
DATA_DIR: /app/data
TZ: ${TZ:-Asia/Shanghai}
restart: unless-stopped