Self-hosting S3
What this tutorial will cover?
This tutorial will show how to set up minio to work with capgo.
This is not technically required to run capgo.
Setting S3 allows for uploading bundles from the CLI.
Requirements
Getting started
First, create a new directory.
Then create a folder named data
inside.
Then run the following command:
If you ever close the console window with this container you can start it with:
If you ever need to change the configuration of minio you can remove the container by running:
⚠️ This command does not remove minio data
Setting up edge functions
Now that we have a S3 server running we need to set up capgo edge functions to use our S3 server.
To do that we need to create an ENV file in capgo/supabase
named .env.local
This file should look like this:
The ip host.docker.internal
is a docker ip that can be both reached only by docker internally, but we replace it in the code with 0.0.0.0
so that minio can be reached from localhost.
To run edge functions with our new env file use
Setting up CLI to use S3
The CLI will not work by default with minio. The following change to capacitor.config.ts
1 is required.
Footnotes
-
File is located in your app directory ↩