From 7c01270f3e95c7eab12219714f7a27caaf33cacc Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Fri, 19 Feb 2021 09:00:46 +0300 Subject: Adds Production Constant Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- README.md | 1 + 1 file changed, 1 insertion(+) (limited to 'README.md') diff --git a/README.md b/README.md index 3e38ef5..ea20937 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Create a `.env` file in the root with the following values inside it (each varia - `OAUTH2_CLIENT_ID`: Client ID of Discord OAuth2 Application (see prerequisites). - `OAUTH2_CLIENT_SECRET`: Client Secret of Discord OAuth2 Application (see prerequisites). - `ALLOWED_URL`: Allowed origin for CORS middleware. +- `PRODUCTION`: Set to False if running on localhost. Defaults to true. #### Running To start using the application, simply run `docker-compose up` in the repository root. You'll be able to access the application by visiting http://localhost:8000/ -- cgit v1.2.3 From 3b20acf3d422f99f1cd36400aafc06fc73e1c5d9 Mon Sep 17 00:00:00 2001 From: Matteo Bertucci Date: Thu, 25 Feb 2021 14:48:37 +0100 Subject: Document the SNEKBOX_URL env var --- README.md | 2 ++ docker-compose.yml | 1 + 2 files changed, 3 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 3e38ef5..be0c8b9 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ To start working on forms-backend, you'll need few things: 2. Poetry 3. Docker and docker-compose (optional) 4. Running MongoDB instance (when not using Docker) +5. Running [Snekbox](https://git.pydis.com/snekbox) instance (when not using Docker, optional) ### Running with Docker The easiest way to run forms-backend is using Docker (and docker-compose). @@ -29,6 +30,7 @@ Create a `.env` file with the same contents as the Docker section above and the - `FRONTEND_URL`: Forms frontend URL. - `DATABASE_URL`: MongoDB instance URI, in format `mongodb://(username):(password)@(database IP or domain):(port)`. - `MONGO_DB`: MongoDB database name, defaults to `pydis_forms`. +- `SNEKBOX_URL`: Snekbox evaluation endpoint. #### Running Simply run: `$ uvicorn --reload --host 0.0.0.0 --debug backend:app`. diff --git a/docker-compose.yml b/docker-compose.yml index fd2eee4..4e58ef7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,6 +32,7 @@ services: - .:/app:ro environment: - DATABASE_URL=mongodb://forms-backend:forms-backend@mongo:27017 + - SNEKBOX_URL=http://snekbox:8060/eval - OAUTH2_CLIENT_ID - OAUTH2_CLIENT_SECRET - ALLOWED_URL -- cgit v1.2.3