Kaynağa Gözat

Fixing build script

svalavuo 1 gün önce
ebeveyn
işleme
5913a1cf21
2 değiştirilmiş dosya ile 4 ekleme ve 1 silme
  1. 3 0
      Dockerfile
  2. 1 1
      build.sh

+ 3 - 0
Dockerfile

@@ -51,6 +51,9 @@ RUN composer install --no-dev --optimize-autoloader
 # Copy built frontend from builder stage
 COPY --from=frontend-builder /app/frontend/dist ./frontend/dist
 
+# Copy test script for environment testing
+COPY test-env.php ./
+
 # Create uploads directory and set permissions
 RUN mkdir -p uploads && \
     chown -R www-data:www-data /var/www/html/uploads && \

+ 1 - 1
build.sh

@@ -88,7 +88,7 @@ echo ""
 
 # Test environment variables and database connectivity
 echo "🔍 Testing environment variables and database connectivity..."
-if ! docker-compose run --rm inventory-app php test-env.php; then
+if ! docker-compose run --rm inventory-app php /var/www/html/test-env.php; then
     echo "❌ Environment variables or database connection test failed."
     echo "💡 Make sure:"
     echo "   - Environment variables are properly set in .env"