I started a virtual machine on Google Compute Engine with a docker image containing nginx with an angular app. I should inject an external configuration file, but I cant't load by using Cloud storage bucket. Any idea?
1 Answers
1
votes
You can use Instance Metadata to store configuration for your machine.
Then in startup script you can use curl to retrieve that metadata, place it in proper place and start container.
Example command to retrieve metadata:
curl -s -f 'http://metadata.google.internal/computeMetadata/v1/instance/attributes/your-attribute' -H 'Metadata-Flavor: Google'