This is an automated email from the ASF dual-hosted git repository.

yasith pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/master by this push:
     new 9e541b36c4 fix the devcontainer startup
9e541b36c4 is described below

commit 9e541b36c4f81aba9554a87c418741c28a0b0870
Author: yasithdev <[email protected]>
AuthorDate: Fri Jul 4 07:14:34 2025 -0500

    fix the devcontainer startup
---
 .devcontainer/docker-compose.yml     | 12 +++++++++++
 .devcontainer/pga/000-default.conf   | 10 ---------
 .devcontainer/pga/Dockerfile         | 39 ++++++++++++++++++++++++++++--------
 .devcontainer/pga/default.conf       |  4 ----
 .devcontainer/pga/docker-compose.yml | 11 ----------
 .devcontainer/pga/vhost.conf         | 17 ----------------
 6 files changed, 43 insertions(+), 50 deletions(-)

diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml
index 1920fb4d20..1219394032 100644
--- a/.devcontainer/docker-compose.yml
+++ b/.devcontainer/docker-compose.yml
@@ -140,3 +140,15 @@ services:
         ipv4_address: 192.168.100.17
     extra_hosts:
       - "airavata.host:192.168.100.1"
+
+  pga:
+    build: pga
+    volumes:
+      - /tmp:/tmp
+    ports:
+      - "8000:80"
+    networks:
+      airavata-network:
+        ipv4_address: 192.168.100.18
+    extra_hosts:
+      - "airavata.host:192.168.100.1"
diff --git a/.devcontainer/pga/000-default.conf 
b/.devcontainer/pga/000-default.conf
deleted file mode 100644
index dec81542d8..0000000000
--- a/.devcontainer/pga/000-default.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-<VirtualHost *:80>
-
-    DocumentRoot /var/www/portals/default/public
-    <Directory "/var/www/portals/default/public">
-       AllowOverride All
-    </Directory>
-    ErrorLog /var/log/apache2/default.error.log
-    CustomLog /var/log/apache2/default.requests.log combined
-
-</VirtualHost>
\ No newline at end of file
diff --git a/.devcontainer/pga/Dockerfile b/.devcontainer/pga/Dockerfile
index beb9af0f68..e40ac6a74a 100644
--- a/.devcontainer/pga/Dockerfile
+++ b/.devcontainer/pga/Dockerfile
@@ -1,13 +1,36 @@
-FROM nimmis/apache-php5
+FROM php:8.1-apache
 
-# Download source from GitHub and extract to /var/www/portals/default
-RUN curl -L 
https://github.com/apache/airavata-portals/archive/refs/heads/main.tar.gz | tar 
-xz --strip-components=2 -C /var/www/portals/default 
airavata-portals-main/airavata-php-gateway
+# Install required PHP extensions and tools from apt
+RUN apt-get update && apt-get install -y wget git unzip && rm -rf 
/var/lib/apt/lists/*
 
-# COPY default.conf /etc/apache2/sites-available/default.conf
-COPY 000-default.conf /etc/apache2/sites-available/000-default.conf
-# COPY pga-default.conf /etc/apache2/sites-available/pga-default.conf
-RUN mkdir /var/www/portals
+# Install Composer (official way)
+RUN wget https://getcomposer.org/installer -O composer-setup.php && \
+  php composer-setup.php --install-dir=/usr/local/bin --filename=composer && \
+  rm composer-setup.php
+
+# Set up your application (example)
+RUN mkdir -p /var/www/portals/default
+
+RUN wget -q 
https://github.com/apache/airavata-portals/archive/refs/heads/main.tar.gz -O 
/tmp/portals.tar.gz && \
+  tar -xzf /tmp/portals.tar.gz --strip-components=2 -C 
/var/www/portals/default airavata-portals-main/airavata-php-gateway && \
+  rm /tmp/portals.tar.gz
+
+COPY pga-default.conf /etc/apache2/sites-available/000-default.conf
+
+# Enable Apache modules
 RUN a2enmod rewrite
+
+RUN mkdir -p /var/www/portals/default/storage/views && \
+    mkdir -p /var/www/portals/default/storage/sessions && \
+    mkdir -p /var/www/portals/default/bootstrap/cache
+
+# Set proper permissions for Laravel
+RUN chmod -R 775 /var/www/portals/default/storage/views && \
+    chmod -R 775 /var/www/portals/default/storage/sessions && \
+    chmod -R 775 /var/www/portals/default/bootstrap/cache
+
+WORKDIR /var/www/portals/default
+RUN composer install
+
 EXPOSE 80
 EXPOSE 443
-CMD [ "/bin/sh", "-c", "mkdir -p /var/www/portals/default/app/storage/views/ 
&& mkdir -p /var/www/portals/default/app/storage/sessions/ && composer 
--working-dir=/var/www/portals/default install && echo 'Starting sever..' && 
/usr/sbin/apache2ctl -D FOREGROUND"]
diff --git a/.devcontainer/pga/default.conf b/.devcontainer/pga/default.conf
deleted file mode 100644
index 2ffbe53bb3..0000000000
--- a/.devcontainer/pga/default.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-Listen 80
-<VirtualHost _default_:80>
-    DocumentRoot "/www/default"
-</VirtualHost>
\ No newline at end of file
diff --git a/.devcontainer/pga/docker-compose.yml 
b/.devcontainer/pga/docker-compose.yml
deleted file mode 100644
index 1acc053330..0000000000
--- a/.devcontainer/pga/docker-compose.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-version: '2.1'
-services:
-  pga:
-    image: dimuthuupe/pga:1.0
-    volumes:
-      - ./airavata-php-gateway:/var/www/portals/default
-      - /tmp:/tmp
-    ports:
-      - "8008:80"
-    mem_limit: 3G
-    mem_reservation: 3G
diff --git a/.devcontainer/pga/vhost.conf b/.devcontainer/pga/vhost.conf
deleted file mode 100644
index af32ef32aa..0000000000
--- a/.devcontainer/pga/vhost.conf
+++ /dev/null
@@ -1,17 +0,0 @@
-server {
-    listen 80;
-    index index.php index.html;
-    root /var/www/public;
-
-    location / {
-        try_files $uri /index.php?$args;
-    }
-
-    location ~ \.php$ {
-        fastcgi_split_path_info ^(.+\.php)(/.+)$;
-        fastcgi_index index.php;
-        include fastcgi_params;
-        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
-        fastcgi_param PATH_INFO $fastcgi_path_info;
-    }
-}
\ No newline at end of file

Reply via email to