🔧 Fix Docker Compose Deployment Issues
✅ Removed Obsolete Version: - Removed deprecated 'version: 3.8' from docker-compose.prod.yml - Docker Compose now uses latest format ✅ Fixed Network Configuration: - Removed external 'proxy' network reference - Portfolio app now only uses internal 'portfolio-network' - No more 'undefined network proxy' error ✅ Fixed Environment Variables: - Added proper environment variable exports in GitHub Actions - All required variables now properly set during deployment - No more 'variable not set' warnings 🎯 Deployment Issues Resolved: - Docker Compose validation now passes - Environment variables properly configured - Network configuration simplified and working 🚀 Ready for Production Deployment!
This commit is contained in:
8
.github/workflows/ci-cd.yml
vendored
8
.github/workflows/ci-cd.yml
vendored
@@ -176,6 +176,14 @@ jobs:
|
|||||||
export CONTAINER_NAME="portfolio-app"
|
export CONTAINER_NAME="portfolio-app"
|
||||||
export COMPOSE_FILE="docker-compose.prod.yml"
|
export COMPOSE_FILE="docker-compose.prod.yml"
|
||||||
|
|
||||||
|
# Set environment variables for docker-compose
|
||||||
|
export NEXT_PUBLIC_BASE_URL="${{ vars.NEXT_PUBLIC_BASE_URL }}"
|
||||||
|
export MY_EMAIL="${{ vars.MY_EMAIL }}"
|
||||||
|
export MY_INFO_EMAIL="${{ vars.MY_INFO_EMAIL }}"
|
||||||
|
export MY_PASSWORD="${{ secrets.MY_PASSWORD }}"
|
||||||
|
export MY_INFO_PASSWORD="${{ secrets.MY_INFO_PASSWORD }}"
|
||||||
|
export ADMIN_BASIC_AUTH="${{ secrets.ADMIN_BASIC_AUTH }}"
|
||||||
|
|
||||||
# Pull latest image
|
# Pull latest image
|
||||||
docker pull $IMAGE_NAME
|
docker pull $IMAGE_NAME
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
portfolio:
|
portfolio:
|
||||||
build:
|
build:
|
||||||
@@ -23,7 +21,6 @@ services:
|
|||||||
- portfolio_data:/app/.next/cache
|
- portfolio_data:/app/.next/cache
|
||||||
networks:
|
networks:
|
||||||
- portfolio-network
|
- portfolio-network
|
||||||
- proxy
|
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|||||||
Reference in New Issue
Block a user