refactor(backoffice): rename PORT to BACKOFFICE_PORT and HOST to BACKOFFICE_HOST

This commit is contained in:
Tiago Yamamoto 2025-12-23 23:59:52 -03:00
parent 35d3032d52
commit 60a32120e2
3 changed files with 23 additions and 7 deletions

View file

@ -1,23 +1,39 @@
PORT=3001
# =============================================================================
# GoHorse Backoffice - Environment Variables
# =============================================================================
# Server
BACKOFFICE_PORT=3001
BACKOFFICE_HOST=0.0.0.0
NODE_ENV=development
# =============================================================================
# Stripe
# =============================================================================
STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret
STRIPE_PUBLISHABLE_KEY=pk_test_your_publishable_key
# =============================================================================
# Database
# =============================================================================
DATABASE_URL=postgresql://user:password@localhost:5432/gohorse_backoffice
# =============================================================================
# JWT
# =============================================================================
JWT_SECRET=your-super-secret-jwt-key
JWT_EXPIRATION=7d
# Cloudflare
# =============================================================================
# Cloudflare API (for cache management)
# =============================================================================
CLOUDFLARE_API_TOKEN=your-cloudflare-api-token
CLOUDFLARE_ZONE_ID=your-zone-id
# cPanel
# =============================================================================
# cPanel API (for email management)
# =============================================================================
CPANEL_HOST=https://cpanel.yourdomain.com:2083
CPANEL_USERNAME=your-cpanel-username
CPANEL_API_TOKEN=your-cpanel-api-token

View file

@ -65,8 +65,8 @@ RUN find node_modules -name "*.md" -delete 2>/dev/null || true && \
# Environment
ENV NODE_ENV=production
ENV PORT=3001
ENV HOST=0.0.0.0
ENV BACKOFFICE_PORT=3001
ENV BACKOFFICE_HOST=0.0.0.0
# Switch to non-root user
USER nestjs

View file

@ -86,8 +86,8 @@ async function bootstrap() {
fastifyInstance.get('/health', async () => ({ status: 'ok', timestamp: new Date().toISOString() }));
// Start server
const port = process.env.PORT || 3001;
const host = process.env.HOST || '0.0.0.0';
const port = process.env.BACKOFFICE_PORT || 3001;
const host = process.env.BACKOFFICE_HOST || '0.0.0.0';
await app.listen(port, host);