From 38a1a2b438d6ddeb3200a7f14c2baf653cc7f089 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 30 Mar 2025 21:06:49 -0600 Subject: [PATCH] Add Codex blueprint with Docker Compose and configuration files - Introduced Docker Compose setup for Codex service, including environment variables and volume configuration. - Added logo for Codex. - Created template.toml for Codex with default variables for configuration. --- blueprints/codex-docs/docker-compose.yml | 31 ++++++++++++++ blueprints/codex-docs/logo.svg | 52 ++++++++++++++++++++++++ blueprints/codex-docs/template.toml | 23 +++++++++++ 3 files changed, 106 insertions(+) create mode 100644 blueprints/codex-docs/docker-compose.yml create mode 100644 blueprints/codex-docs/logo.svg create mode 100644 blueprints/codex-docs/template.toml diff --git a/blueprints/codex-docs/docker-compose.yml b/blueprints/codex-docs/docker-compose.yml new file mode 100644 index 00000000..99fb5597 --- /dev/null +++ b/blueprints/codex-docs/docker-compose.yml @@ -0,0 +1,31 @@ +version: "3" + +services: + codex: + image: ghcr.io/codex-team/codex.docs:v2.2 + ports: + - "3000" + environment: + - APP_CONFIG_database_driver=mongodb + - APP_CONFIG_database_mongodb_uri=mongodb://mongo:${MONGO_PASSWORD}@mongo:27017 + - APP_CONFIG_auth_password=${AUTH_PASSWORD} + - APP_CONFIG_auth_secret=${AUTH_SECRET} + volumes: + - uploads:/usr/src/app/uploads + - db:/usr/src/app/db + - ../files/docs-config.yaml:/usr/src/app/docs-config.yaml + depends_on: + - mongo + + mongo: + image: mongo:4 + environment: + - MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASSWORD} + - MONGO_INITDB_ROOT_USERNAME=${MONGO_USERNAME} + volumes: + - mongo-data:/data/db + +volumes: + uploads: + db: + mongo-data: \ No newline at end of file diff --git a/blueprints/codex-docs/logo.svg b/blueprints/codex-docs/logo.svg new file mode 100644 index 00000000..d2f890ea --- /dev/null +++ b/blueprints/codex-docs/logo.svg @@ -0,0 +1,52 @@ + + + Codex Logo + Created with Sketch. + + + + + + + + + \ No newline at end of file diff --git a/blueprints/codex-docs/template.toml b/blueprints/codex-docs/template.toml new file mode 100644 index 00000000..e48a5331 --- /dev/null +++ b/blueprints/codex-docs/template.toml @@ -0,0 +1,23 @@ +[variables] +MONGO_PASSWORD = "${password:16}" +AUTH_PASSWORD = "${password:16}" +AUTH_SECRET = "${password:32}" + +[config] +[[config.domains]] +serviceName = "codex" +port = 3000 +host = "${domain}" + +[config.env] +MONGO_PASSWORD = "${MONGO_PASSWORD}" +AUTH_PASSWORD = "${AUTH_PASSWORD}" +AUTH_SECRET = "${AUTH_SECRET}" +MONGO_USERNAME = "mongo" + +[[config.mounts]] +filePath = "/docs-config.yaml" +content = """ +# Custom Config, view Here https://github.com/codex-team/codex.docs/blob/main/docs-config.yaml +# Can Also Be configured with ENV, see here https://docs.codex.so/configuration#override-properties-with-environment-variables +""" \ No newline at end of file