FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Deploy FusionAuth on Google Cloud Run.

    Scheduled Pinned Locked Moved Unsolved
    Q&A
    1
    1
    1.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      emaborsa
      last edited by

      Hi,
      I am trying to deploy FusionAuth in a Google Cloud Run. Since it runs on port 9011 a proxy is required and I followed this tutorial in order to deploy FusionAuth as a sidecar container.

      This is my Dockerfile:

      FROM fusionauth/fusionauth-app:latest
      
      ENV DATABASE_URL=${DATABASE_URL} \
          DATABASE_ROOT_USERNAME=${DATABASE_USERNAME} \
          DATABASE_ROOT_PASSWORD=${DATABASE_PASSWORD} \
          DATABASE_USERNAME=${DATABASE_USERNAME} \
          DATABASE_PASSWORD=${DATABASE_PASSWORD} \
          FUSIONAUTH_APP_MEMORY=${FUSIONAUTH_APP_MEMORY} \
          FUSIONAUTH_APP_RUNTIME_MODE=${FUSIONAUTH_APP_RUNTIME_MODE} \
          FUSIONAUTH_APP_URL=http://localhost:9011 \
          SEARCH_TYPE=database
      
      EXPOSE 9011
      

      And this is my nginx.conf:

      server {
          listen 8080; 
          server_name _;
      
          location / {
              proxy_http_version 1.1;
          proxy_pass   http://127.0.0.1:9011;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-Forwarded-Proto https;
              proxy_set_header X-Forwarded-Port 443;
              proxy_set_header X-Forwarded-Server nginx-proxy-902975327674.europe-west8.run.app;
              proxy_set_header X-Forwarded-Host nginx-proxy-902975327674.europe-west8.run.app;
          }
      
          location /health_check {
      	access_log off;
      	add_header 'Content-Type' 'application/json';
      	return 200 '{"status":"UP"}';
          }
      }
      

      It deploys, but unfortunately I get 502 Bad Gateway. The /healt_check returns 200.

      Any idea?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post