Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Update env var handling in docker compose; Update dockerized start in README [WIP]

Tomas Valenta91f9054b59e9
diff --git a/README.md b/README.md
index 30676f76b..aaaa50c90 100644
--- a/README.md
+++ b/README.md
@@ -31,28 +31,20 @@ e2b currently supports building only REST servers in Node.js. Specifically using
We're working on the cloud-hosted version. In the meantime, the fastest way try out e2b is to run it locally via Docker.
You will need:
-- OpenAI API key (support for more and custom models coming soon)
+- [OpenAI API key](https://platform.openai.com/account/api-keys) (support for more and custom models coming soon)
- Docker
- Node.js *16+*
- Free ports 3000 (Next.js app), 54321 (Supabase API Gateway), 54322 (Supabase Database)
> The first start of the Dockerized app is slower because it downloads and builds all the necessary containers. On a 2CPU 4GB RAM machine it takes cca. 6 minutes and doesn't require any interaction. The subsequent starts are way faster.
-## 1. Add env var
-Create `.env` file by copying the [`.env.example`](.env.example)
-```
-cp .env.example .env
-```
-and fill in the following variable:
-- `OPENAI_API_KEY` - your [OpenAI key](https://platform.openai.com/account/api-keys)
-
-## 2. Start the app
+## 1. Start the app
```
npm start
```
Then open the page on [http://localhost:3000](http://localhost:3000).
-> `npm run start` starts local Supabase in the background - to stop it you have to run `npm run stop`.
+> `npm start` starts local Supabase in the background - to stop it you have to run `npm run stop`.
> If you want to run the project without using containers use the [steps here](#development). This is useful if you want to leverage hot reloading and develop the project.
@@ -101,7 +93,7 @@ We think the AI-powered IDE for the future should be open-sourced and allow anyb
# 💻 Development
-For developing with hot reloading and contributing to the project you may want to run the app locally without Docker Compose (`npm run start` command). Here are the steps for how to do it.
+For developing with hot reloading and contributing to the project you may want to run the app locally without Docker Compose (`npm start` command). Here are the steps for how to do it.
You will need:
- OpenAI API key (support for more and custom models coming soon)
diff --git a/docker-compose.yml b/docker-compose.yml
index ef2c570e6..b6f1ca088 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -8,8 +8,8 @@ services:
environment:
- PORT=49155
- SUPABASE_URL=http://supabase_kong_workspace:8000
- - SUPABASE_SERVICE_ROLE_KEY=${SUPABASE_SERVICE_ROLE_KEY}
- - OPENAI_API_KEY=${OPENAI_API_KEY}
+ # The following default key is generated by the local Supabase start and doesn't change
+ - SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
expose:
- 49155
external_links:
@@ -18,14 +18,15 @@ services:
networks:
- supabase-local-net
- app-dev:
- image: e2b/app-dev:latest
+ app:
+ image: e2b/app:latest
build:
context: ./
args:
NEXT_PUBLIC_SIGN_IN_EMAIL: [email protected]
NEXT_PUBLIC_SIGN_IN_PASSWORD: [email protected]
- NEXT_PUBLIC_SUPABASE_ANON_KEY: ${NEXT_PUBLIC_SUPABASE_ANON_KEY}
+ # The following default key is generated by the local Supabase start and doesn't change
+ NEXT_PUBLIC_SUPABASE_ANON_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU
external_links:
- supabase_kong_workspace
- supabase_db_workspace
@@ -34,7 +35,8 @@ services:
- SUPABASE_URL=http://supabase_kong_workspace:8000
- API_URL=http://api:49155
- SUPABASE_POSTGRES_URL=postgresql://postgres:postgres@supabase_db_workspace:5432/postgres
- - SUPABASE_SERVICE_ROLE_KEY=${SUPABASE_SERVICE_ROLE_KEY}
+ # The following default key is generated by the local Supabase start and doesn't change
+ - SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
ports:
- 3000:3000
networks: