Trying to install metabase on compute engine

Metabase Docker not loading on /metabase β€” Apache serving Laravel instead

Hey everyone :waving_hand:

I’m running a Laravel app and Metabase (in Docker) on the same Google Compute Engine VM.

What I want:

 My Laravel app β†’ http://<VM-IP>/

 Metabase β†’ http://<VM-IP>/metabase

 Metabase not exposed on port 3000

What I did so far:

I run Metabase in Docker:

 sudo docker run -d -p 3000:3000 \
-e MB_SITE_URL="http://127.0.0.1/metabase" \
--name metabase metabase/metabase

Checked with:

   curl http://127.0.0.1:3000

:white_check_mark: It returns Metabase HTML, so the container works.

Then I configured Apache with proxy:

   /etc/apache2/sites-available/metabase.conf

   <VirtualHost *:80>
     ProxyPreserveHost On
     ProxyRequests Off

     ProxyPass /metabase http://127.0.0.1:3000/
     ProxyPassReverse /metabase http://127.0.0.1:3000/

     ErrorLog ${APACHE_LOG_DIR}/metabase_error.log
    CustomLog ${APACHE_LOG_DIR}/metabase_access.log combined
  </VirtualHost>

Enabled modules and site:

 sudo a2enmod proxy
 sudo a2enmod proxy_http
 sudo a2ensite metabase.conf
 sudo systemctl reload apache2

Problem:

http:/// β†’ Laravel login page :white_check_mark:

curl http://127.0.0.1/metabase β†’ Shows Metabase HTML :white_check_mark:

http://<VM-IP>/metabase β†’ Laravel 404 ❌

So Apache still routes /metabase to Laravel instead of the proxy.

   Question:

  How can I properly configure Apache so that /metabase proxies to the Docker container β€” without     exposing port 3000 publicly?  I am trying to use the best practice to test something on gcp compute engine 

Check your VirtualHost directives, apparently 127.0.0.1 and VM-IP are matching different blocks. Also watch the browser console and make sure something isn’t throwing you a redirect.

no luck is there a guide i can follow to help with the configration set up, best practice to run metabase on gcp compute engine

I uninstall metabse form docker. could you guide me with a clean and professional way to install metabase on compute engine