mirror of
https://dev.azure.com/tstanciu94/PhantomMind/_git/Bitip
synced 2025-10-13 01:52:19 +03:00
refactor: update MaxMind database path from /usr/share/GeoIP to /usr/share/maxmind in configuration files and documentation
This commit is contained in:
parent
900a6e05a4
commit
88f15392e7
@ -16,7 +16,7 @@ BASE_PATH=/
|
|||||||
NODE_ENV=production
|
NODE_ENV=production
|
||||||
|
|
||||||
# Database Path (usually doesn't need to change)
|
# Database Path (usually doesn't need to change)
|
||||||
MAXMIND_DB_PATH=/usr/share/GeoIP
|
MAXMIND_DB_PATH=/usr/share/maxmind
|
||||||
|
|
||||||
# Rate Limiting Configuration
|
# Rate Limiting Configuration
|
||||||
FRONTEND_RATE_WINDOW_MS=60000 # 1 minute window
|
FRONTEND_RATE_WINDOW_MS=60000 # 1 minute window
|
||||||
|
2
.env.production
Normal file
2
.env.production
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Database Path (usually doesn't need to change)
|
||||||
|
MAXMIND_DB_PATH=/usr/share/maxmind
|
@ -79,8 +79,8 @@ COPY --from=builder /app/ReleaseNotes.json ./
|
|||||||
COPY --from=builder /app/Overview.json ./
|
COPY --from=builder /app/Overview.json ./
|
||||||
|
|
||||||
# Create directory for GeoIP databases
|
# Create directory for GeoIP databases
|
||||||
RUN mkdir -p /usr/share/GeoIP && \
|
RUN mkdir -p /usr/share/maxmind && \
|
||||||
chown -R bitip:nodejs /usr/share/GeoIP
|
chown -R bitip:nodejs /usr/share/maxmind
|
||||||
|
|
||||||
# Change ownership of app directory
|
# Change ownership of app directory
|
||||||
RUN chown -R bitip:nodejs /app
|
RUN chown -R bitip:nodejs /app
|
||||||
@ -92,7 +92,7 @@ USER bitip
|
|||||||
EXPOSE 5172
|
EXPOSE 5172
|
||||||
|
|
||||||
# Health check
|
# Health check
|
||||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
HEALTHCHECK --interval=60s --timeout=3s --start-period=20s --retries=3 \
|
||||||
CMD node -e "require('http').get('http://localhost:5172/api/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) }).on('error', () => { process.exit(1) })"
|
CMD node -e "require('http').get('http://localhost:5172/api/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) }).on('error', () => { process.exit(1) })"
|
||||||
|
|
||||||
# Start the application
|
# Start the application
|
||||||
|
@ -53,7 +53,7 @@ NODE_ENV=development
|
|||||||
|
|
||||||
# Database Path - Point to your MaxMind databases location
|
# Database Path - Point to your MaxMind databases location
|
||||||
MAXMIND_DB_PATH=D:\tools\maxmind-dbs # Windows
|
MAXMIND_DB_PATH=D:\tools\maxmind-dbs # Windows
|
||||||
# MAXMIND_DB_PATH=/usr/share/GeoIP # Linux/Mac
|
# MAXMIND_DB_PATH=/usr/share/maxmind # Linux/Mac
|
||||||
|
|
||||||
# Rate Limiting Configuration
|
# Rate Limiting Configuration
|
||||||
FRONTEND_RATE_WINDOW_MS=60000
|
FRONTEND_RATE_WINDOW_MS=60000
|
||||||
@ -327,7 +327,7 @@ npm run install:all # Install all dependencies (root + backend + frontend)
|
|||||||
| `PORT` | `5172` | Server port |
|
| `PORT` | `5172` | Server port |
|
||||||
| `BASE_PATH` | `/` | Application base path |
|
| `BASE_PATH` | `/` | Application base path |
|
||||||
| `NODE_ENV` | `development` | Environment mode (development/production) |
|
| `NODE_ENV` | `development` | Environment mode (development/production) |
|
||||||
| `MAXMIND_DB_PATH` | `/usr/share/GeoIP` | MaxMind database directory |
|
| `MAXMIND_DB_PATH` | `/usr/share/maxmind` | MaxMind database directory |
|
||||||
| `FRONTEND_API_KEY` | `frontend-default-key` | Frontend API key |
|
| `FRONTEND_API_KEY` | `frontend-default-key` | Frontend API key |
|
||||||
| `EXTERNAL_API_KEYS` | `external-default-key` | External API keys (comma-separated) |
|
| `EXTERNAL_API_KEYS` | `external-default-key` | External API keys (comma-separated) |
|
||||||
| `FRONTEND_RATE_WINDOW_MS` | `60000` | Frontend rate limit window (milliseconds) |
|
| `FRONTEND_RATE_WINDOW_MS` | `60000` | Frontend rate limit window (milliseconds) |
|
||||||
|
@ -11,7 +11,7 @@ services:
|
|||||||
- GEOIPUPDATE_EDITION_IDS=GeoLite2-City,GeoLite2-Country
|
- GEOIPUPDATE_EDITION_IDS=GeoLite2-City,GeoLite2-Country
|
||||||
- GEOIPUPDATE_FREQUENCY=168 # Update weekly (in hours)
|
- GEOIPUPDATE_FREQUENCY=168 # Update weekly (in hours)
|
||||||
volumes:
|
volumes:
|
||||||
- geoip_data:/usr/share/GeoIP
|
- geoip_data:/usr/share/maxmind
|
||||||
networks:
|
networks:
|
||||||
- bitip-network
|
- bitip-network
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ services:
|
|||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
|
|
||||||
# MaxMind Database Path
|
# MaxMind Database Path
|
||||||
- MAXMIND_DB_PATH=/usr/share/GeoIP
|
- MAXMIND_DB_PATH=/usr/share/maxmind
|
||||||
|
|
||||||
# API Keys (Change these in production!)
|
# API Keys (Change these in production!)
|
||||||
- FRONTEND_API_KEY=your-frontend-api-key-here
|
- FRONTEND_API_KEY=your-frontend-api-key-here
|
||||||
@ -48,7 +48,7 @@ services:
|
|||||||
- SEQ_URL=${SEQ_URL}
|
- SEQ_URL=${SEQ_URL}
|
||||||
- SEQ_API_KEY=${SEQ_API_KEY}
|
- SEQ_API_KEY=${SEQ_API_KEY}
|
||||||
volumes:
|
volumes:
|
||||||
- geoip_data:/usr/share/GeoIP:ro
|
- geoip_data:/usr/share/maxmind:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- geoipupdate
|
- geoipupdate
|
||||||
networks:
|
networks:
|
||||||
|
@ -133,8 +133,8 @@ MAXMIND_DB_PATH=D:\\tools\\maxmind-dbs
|
|||||||
- **Format**: Absolute path (OS-specific)
|
- **Format**: Absolute path (OS-specific)
|
||||||
- **Required**: Yes
|
- **Required**: Yes
|
||||||
- **Windows Example**: `D:\\tools\\maxmind-dbs` (note double backslashes)
|
- **Windows Example**: `D:\\tools\\maxmind-dbs` (note double backslashes)
|
||||||
- **Linux Example**: `/usr/share/GeoIP`
|
- **Linux Example**: `/usr/share/maxmind`
|
||||||
- **Docker Example**: `/usr/share/GeoIP` (mounted volume)
|
- **Docker Example**: `/usr/share/maxmind` (mounted volume)
|
||||||
- **Expected Files**:
|
- **Expected Files**:
|
||||||
- `GeoLite2-City.mmdb` - City-level geolocation database
|
- `GeoLite2-City.mmdb` - City-level geolocation database
|
||||||
- Provided by separate GeoIP update service or manual download
|
- Provided by separate GeoIP update service or manual download
|
||||||
@ -348,7 +348,7 @@ FRONTEND_ALLOWED_ORIGINS=https://your-domain.com,https://www.your-domain.com
|
|||||||
PORT=5172
|
PORT=5172
|
||||||
BASE_PATH=/
|
BASE_PATH=/
|
||||||
NODE_ENV=production
|
NODE_ENV=production
|
||||||
MAXMIND_DB_PATH=/usr/share/GeoIP
|
MAXMIND_DB_PATH=/usr/share/maxmind
|
||||||
FRONTEND_RATE_WINDOW_MS=60000
|
FRONTEND_RATE_WINDOW_MS=60000
|
||||||
FRONTEND_RATE_MAX=30
|
FRONTEND_RATE_MAX=30
|
||||||
EXTERNAL_RATE_WINDOW_MS=60000
|
EXTERNAL_RATE_WINDOW_MS=60000
|
||||||
|
@ -13,7 +13,7 @@ dotenvConfig({ path: path.join(__dirname, '../../../.env') });
|
|||||||
export const config: Config = {
|
export const config: Config = {
|
||||||
port: parseInt(process.env.PORT || '5172', 10),
|
port: parseInt(process.env.PORT || '5172', 10),
|
||||||
basePath: process.env.BASE_PATH || '/',
|
basePath: process.env.BASE_PATH || '/',
|
||||||
maxmindDbPath: process.env.MAXMIND_DB_PATH || '/usr/share/GeoIP',
|
maxmindDbPath: process.env.MAXMIND_DB_PATH || '/usr/share/maxmind',
|
||||||
seqUrl: process.env.SEQ_URL,
|
seqUrl: process.env.SEQ_URL,
|
||||||
seqApiKey: process.env.SEQ_API_KEY,
|
seqApiKey: process.env.SEQ_API_KEY,
|
||||||
apiKeys: {
|
apiKeys: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user