title: Using Google Coud Run (or any cloud service) with Docker-compose app with simple python script
body: <p>I have a relatively simple docker application using docker-compose that I would like to deploy. All it contains is a python script that I would like to automatically run every day that doesn't require user input.</p>
  <p>I would like to use Google Cloud Run to deploy this application, since it doesn't need to be online 24/7. but I'm not sure if it's compatible with a docker-compose.yml.</p>
  <p>Here is my docker-compose file:</p>
  <pre><code>version: '3.9'
  
  secrets:
    venmo_api_key:
      file: ./secrets/venmo_api_token.txt
  
  services:
    app:
      build: ./app
      secrets:
        - venmo_api_key
  </code></pre>
  <p>As you can see, I need docker-compose so that my secrets can be used in my container just by running <code>docker-compose up</code>. It runs fine locally!</p>
  <p>To deploy to my image to Google Container Registry, I've run:</p>
  <ol>
  <li><code>docker-compose build</code></li>
  <li><code>docker tag cb3605 gcr.io/venmoscription-v2/venmoscription-service</code></li>
  <li><code>docker push gcr.io/venmoscription-v2/venmoscription-service</code></li>
  </ol>
  <p>In Google Cloud Run, I selected the GCR URL and left all the other options as default just to see if my container could run online. However, I got this error in Google Cloud Run Logs:</p>
  <pre><code>False for Revision venmoscription-service-00001-qig with message: Cloud Run error: Container failed to start. Failed to start and then listen on the port defined by the PORT environment variable. Logs for this revision might contain more information.
  </code></pre>
  <p>I also got this error message after:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;/app/main.py&quot;, line 13, in &lt;module&gt;
      client = Client(access_token = get_docker_secret(&quot;venmo_api_key&quot;))
    File &quot;/home/app/.local/lib/python3.9/site-packages/venmo_api/venmo.py&quot;, line 15, in __init__
      self.__profile = self.user.get_my_profile()
    File &quot;/home/app/.local/lib/python3.9/site-packages/venmo_api/apis/user_api.py&quot;, line 26, in get_my_profile
      response = self.__api_client.call_api(resource_path=resource_path,
    File &quot;/home/app/.local/lib/python3.9/site-packages/venmo_api/utils/api_client.py&quot;, line 58, in call_api
      return self.__call_api(resource_path=resource_path, method=method,
    File &quot;/home/app/.local/lib/python3.9/site-packages/venmo_api/utils/api_client.py&quot;, line 103, in __call_api
      processed_response = self.request(method, url, session,
    File &quot;/home/app/.local/lib/python3.9/site-packages/venmo_api/utils/api_client.py&quot;, line 139, in request
      validated_response = self.__validate_response(response, ok_error_codes=ok_error_codes)
    File &quot;/home/app/.local/lib/python3.9/site-packages/venmo_api/utils/api_client.py&quot;, line 170, in __validate_response
      raise HttpCodeError(response=response)
  venmo_api.models.exception.HttpCodeError: HTTP Status code is invalid. Could not make the request because -&gt; 401 Unauthorized.
  </code></pre>
  <p>Basically, the container in Google Cloud Run was unable to access the secret that I defined in docker-compose.yml.</p>
  <p>Does anyone know what I should be doing, or please explain how to get my docker-compose app up and running with a serverless solution? Thank you!!</p>