25
loading...
This website collects cookies to deliver better user experience
/var/www/html
) in order to be served to clients via the web server.provider "helm" {}
resource "helm_release" "rel_minio" {
name = "files"
chart = "minio"
repository = "https://charts.bitnami.com/bitnami"
}
terraform plan
terraform apply
export minio_access_key=$(kubectl get secret files-minio --namespace econovizer -o=jsonpath='{.data.access-key}' | base64 --decode)
export minio_secret_key=$(kubectl get secret files-minio --namespace econovizer -o=jsonpath='{.data.secret-key}' | base64 --decode)
kubectl port-forward services/files-minio 9000:9000
mc
tool with the $minio_secret_key
and the $minio_access_key
environment variables we created earlier.mc alias set local http://127.0.0.1:9000 $minio_access_key $minio_secret_key
mc mb local/static
mc policy set download local/static
npx create-react-app my-app
my-app
in the current folder. We need to change into the my-app
folder -- cd my-app
. Build the project with the command npm run build
. The build command creates a new folder build
.mc
commandmc cp -r build/* local/static/
mc ls local/static # list the files which were just uploaded to the local/static bucket
http://localhost:9000/static
, however Minio has a limitation which prevents it from serving up files unless they were referenced directly.http://localhost:9000/static
will return an XML document containing a ListBucketResult
instead of index.html
. http://localhost:9000/static/index.html
will return the desired web page. Since the URL would end with index.html
, React would be looking for a web root and fail to load.terraform init
terraform plan -var "acces_key=$minio_access_key" -var "secret_key=$minio_secret_key" -var 'namespace=my-namespace' -out deployment.plan
terraform apply deployment.plan
http://host.docker.internal/
)