mirror of
https://github.com/nethunterzist/trendyol-analiz
synced 2026-07-02 01:47:04 +00:00
feat: configure Coolify deployment for production
- Fix docker-compose.yml for production: use postgres:15-alpine, remove container names, remove postgres external port, set FRONTEND_URL to server IP, use empty VITE_API_URL for nginx proxy - Add production server CORS origins to backend - Add deploy job to GitHub Actions CI/CD pipeline Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,8 +5,7 @@ services:
|
||||
# PostgreSQL Database
|
||||
# ============================================
|
||||
postgres:
|
||||
image: trendyol-postgres:15-alpine
|
||||
container_name: trendyol-postgres
|
||||
image: postgres:15-alpine
|
||||
restart: unless-stopped
|
||||
|
||||
environment:
|
||||
@@ -14,9 +13,6 @@ services:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: trendyol123
|
||||
|
||||
ports:
|
||||
- "5410:5432"
|
||||
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
|
||||
@@ -33,11 +29,9 @@ services:
|
||||
# Backend Service (FastAPI + PostgreSQL)
|
||||
# ============================================
|
||||
backend:
|
||||
image: trendyol-analiz-backend:latest
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: trendyol-backend
|
||||
restart: unless-stopped
|
||||
|
||||
ports:
|
||||
@@ -55,7 +49,7 @@ services:
|
||||
REPORTS_DIR: /data/reports
|
||||
|
||||
# CORS configuration (allow frontend container)
|
||||
FRONTEND_URL: http://localhost:3010
|
||||
FRONTEND_URL: http://194.187.253.230:3010
|
||||
|
||||
volumes:
|
||||
# Persistent data volumes
|
||||
@@ -80,14 +74,12 @@ services:
|
||||
# Frontend Service (React + Nginx)
|
||||
# ============================================
|
||||
frontend:
|
||||
image: trendyol-analiz-frontend:latest
|
||||
build:
|
||||
context: ./admin-panel
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
# API URL baked into production build
|
||||
VITE_API_URL: http://localhost:8010
|
||||
container_name: trendyol-frontend
|
||||
# Empty = relative URL, nginx proxy handles /api/ routing
|
||||
VITE_API_URL: ""
|
||||
restart: unless-stopped
|
||||
|
||||
ports:
|
||||
|
||||
Reference in New Issue
Block a user