refactor(backoffice): rename PORT to BACKOFFICE_PORT and HOST to BACKOFFICE_HOST
This commit is contained in:
parent
35d3032d52
commit
60a32120e2
3 changed files with 23 additions and 7 deletions
|
|
@ -1,23 +1,39 @@
|
||||||
PORT=3001
|
# =============================================================================
|
||||||
|
# GoHorse Backoffice - Environment Variables
|
||||||
|
# =============================================================================
|
||||||
|
|
||||||
|
# Server
|
||||||
|
BACKOFFICE_PORT=3001
|
||||||
|
BACKOFFICE_HOST=0.0.0.0
|
||||||
NODE_ENV=development
|
NODE_ENV=development
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
# Stripe
|
# Stripe
|
||||||
|
# =============================================================================
|
||||||
STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key
|
STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key
|
||||||
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret
|
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret
|
||||||
STRIPE_PUBLISHABLE_KEY=pk_test_your_publishable_key
|
STRIPE_PUBLISHABLE_KEY=pk_test_your_publishable_key
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
# Database
|
# Database
|
||||||
|
# =============================================================================
|
||||||
DATABASE_URL=postgresql://user:password@localhost:5432/gohorse_backoffice
|
DATABASE_URL=postgresql://user:password@localhost:5432/gohorse_backoffice
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
# JWT
|
# JWT
|
||||||
|
# =============================================================================
|
||||||
JWT_SECRET=your-super-secret-jwt-key
|
JWT_SECRET=your-super-secret-jwt-key
|
||||||
JWT_EXPIRATION=7d
|
JWT_EXPIRATION=7d
|
||||||
|
|
||||||
# Cloudflare
|
# =============================================================================
|
||||||
|
# Cloudflare API (for cache management)
|
||||||
|
# =============================================================================
|
||||||
CLOUDFLARE_API_TOKEN=your-cloudflare-api-token
|
CLOUDFLARE_API_TOKEN=your-cloudflare-api-token
|
||||||
CLOUDFLARE_ZONE_ID=your-zone-id
|
CLOUDFLARE_ZONE_ID=your-zone-id
|
||||||
|
|
||||||
# cPanel
|
# =============================================================================
|
||||||
|
# cPanel API (for email management)
|
||||||
|
# =============================================================================
|
||||||
CPANEL_HOST=https://cpanel.yourdomain.com:2083
|
CPANEL_HOST=https://cpanel.yourdomain.com:2083
|
||||||
CPANEL_USERNAME=your-cpanel-username
|
CPANEL_USERNAME=your-cpanel-username
|
||||||
CPANEL_API_TOKEN=your-cpanel-api-token
|
CPANEL_API_TOKEN=your-cpanel-api-token
|
||||||
|
|
|
||||||
|
|
@ -65,8 +65,8 @@ RUN find node_modules -name "*.md" -delete 2>/dev/null || true && \
|
||||||
|
|
||||||
# Environment
|
# Environment
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENV PORT=3001
|
ENV BACKOFFICE_PORT=3001
|
||||||
ENV HOST=0.0.0.0
|
ENV BACKOFFICE_HOST=0.0.0.0
|
||||||
|
|
||||||
# Switch to non-root user
|
# Switch to non-root user
|
||||||
USER nestjs
|
USER nestjs
|
||||||
|
|
|
||||||
|
|
@ -86,8 +86,8 @@ async function bootstrap() {
|
||||||
fastifyInstance.get('/health', async () => ({ status: 'ok', timestamp: new Date().toISOString() }));
|
fastifyInstance.get('/health', async () => ({ status: 'ok', timestamp: new Date().toISOString() }));
|
||||||
|
|
||||||
// Start server
|
// Start server
|
||||||
const port = process.env.PORT || 3001;
|
const port = process.env.BACKOFFICE_PORT || 3001;
|
||||||
const host = process.env.HOST || '0.0.0.0';
|
const host = process.env.BACKOFFICE_HOST || '0.0.0.0';
|
||||||
|
|
||||||
await app.listen(port, host);
|
await app.listen(port, host);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue