-
Notifications
You must be signed in to change notification settings - Fork 123
Getting_Started
This guide walks you through setting up and running the No-Code Architects Toolkit with Docker. You’ll find instructions for running it locally, on Google Cloud, or on DigitalOcean.
Ensure the following are in place before you begin:
- Docker: Install Docker on your machine. Download Docker
-
API Key: Generate a secure
API_KEY
to use for authentication. - Environment Variables: Set up the necessary environment variables based on your chosen deployment option.
Configure the following environment variables depending on the storage provider you plan to use:
-
General Variables:
-
API_KEY
: Authentication key for API requests. -
GCP_SA_CREDENTIALS
(optional): Google Cloud service account JSON key content for accessing Google Cloud Storage. -
GDRIVE_USER
(optional): Google Drive email for setting up Google Drive access.
-
-
Google Cloud Storage Variables:
-
GCP_BUCKET_NAME
: Name of your Google Cloud Storage bucket for file storage.
-
-
S3-Compatible Storage Variables (DigitalOcean Spaces):
-
S3_ENDPOINT_URL
: Endpoint for your S3-compatible storage service. -
S3_ACCESS_KEY
andS3_SECRET_KEY
: Credentials for accessing the S3-compatible service. -
S3_BUCKET_NAME
: Name of your S3-compatible storage bucket.
-
To run the toolkit locally using Docker, follow these steps:
-
Build the Docker Image:
docker build -t no-code-architects-toolkit .
-
Run the Docker Container: Use one of the following commands based on your storage setup.
-
For Google Cloud Storage:
docker run -p 8080:8080 \ -e API_KEY=your_api_key \ -e GCP_BUCKET_NAME=your_gcp_bucket_name \ -e GCP_SA_CREDENTIALS='contents_of_your_service_account_json' \ no-code-architects-toolkit
-
For Google Drive:
- First, share the target Google Drive folder with the service account email provided by Google.
- Then, run:
docker run -p 8080:8080 \ -e API_KEY=your_api_key \ -e GDRIVE_USER=your_gdrive_user_email \ -e GDRIVE_FOLDER_ID=your_folder_id \ -e GCP_SA_CREDENTIALS='contents_of_your_service_account_json' \ no-code-architects-toolkit
-
For S3-Compatible Storage (e.g., DigitalOcean Spaces):
docker run -p 8080:8080 \ -e API_KEY=your_api_key \ -e S3_ENDPOINT_URL=https://nyc3.digitaloceanspaces.com \ -e S3_ACCESS_KEY=your_s3_access_key \ -e S3_SECRET_KEY=your_s3_secret_key \ -e S3_BUCKET_NAME=your_bucket_name \ no-code-architects-toolkit
-
Google Cloud Run allows for serverless deployment of Docker containers. Follow these steps:
-
Set Up Google Cloud Project:
- Create a new project and enable Cloud Run and Google Cloud Storage APIs.
-
Configure the Docker Image for Google Cloud Run:
- Push the Docker image to a container registry (e.g., Google Container Registry):
gcloud builds submit --tag gcr.io/YOUR_PROJECT_ID/no-code-architects-toolkit
- Push the Docker image to a container registry (e.g., Google Container Registry):
-
Deploy on Google Cloud Run:
- Deploy the image to Cloud Run:
gcloud run deploy no-code-architects-toolkit \ --image gcr.io/YOUR_PROJECT_ID/no-code-architects-toolkit \ --platform managed \ --region us-central1 \ --allow-unauthenticated \ --set-env-vars API_KEY=your_api_key,GCP_BUCKET_NAME=your_gcp_bucket_name,GCP_SA_CREDENTIALS=your_service_account_json
- Deploy the image to Cloud Run:
-
Access and Test:
- Google Cloud Run will provide a URL where your service is running. Test it by making requests to the API, such as:
curl -X POST https://your-service-url/authenticate -H "X-API-Key: your_api_key"
- Google Cloud Run will provide a URL where your service is running. Test it by making requests to the API, such as:
DigitalOcean App Platform offers a straightforward way to deploy Docker containers. Follow these steps:
-
Create a DigitalOcean Account and App:
- Create a new App in DigitalOcean, choose Container Image, and select the Deploy Docker Image option.
-
Configure Environment Variables:
- Add the necessary environment variables for your setup under “App Spec” > “Environment Variables”.
-
Upload or Link the Docker Image:
- Use DigitalOcean’s container registry or link your GitHub repository to build the Docker image.
-
Select Scaling and Resource Options:
- Set memory and CPU limits according to your application needs.
-
Deploy and Test:
- After deployment, DigitalOcean will provide a URL for your service. Test the endpoints using a similar method as described above.
-
Authenticate:
- Make a POST request to verify that authentication is functioning correctly:
curl -X POST http://localhost:8080/authenticate -H "X-API-Key: your_api_key"
- Make a POST request to verify that authentication is functioning correctly:
-
Convert Media to MP3:
- Test media conversion by making a request to the
/media-to-mp3
endpoint:curl -X POST http://localhost:8080/media-to-mp3 \ -H "X-API-Key: your_api_key" \ -H "Content-Type: application/json" \ -d '{"media_url": "https://example.com/media.mp4", "webhook_url": "https://your-webhook.com"}'
- Test media conversion by making a request to the
This guide should help you set up and run the No-Code Architects Toolkit with Docker, whether locally, on Google Cloud, or on DigitalOcean. Let me know if you have any questions or need further customization!