-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚀 feat: add docker-compose support (#301)
* feat: add docker-compose support * feat: add docker-compose support for docker-compose.yml * nits for docker compose --------- Co-authored-by: Shreya Shankar <ss.shankar505@gmail.com>
- Loading branch information
1 parent
79b5934
commit d7eef7d
Showing
5 changed files
with
59 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
|
||
# BACKEND configuration | ||
BACKEND_ALLOW_ORIGINS=http://localhost:3000,http://127.0.0.1:3000 | ||
BACKEND_HOST=localhost | ||
BACKEND_PORT=8000 | ||
BACKEND_RELOAD=True | ||
|
||
# FRONTEND configuration | ||
FRONTEND_HOST=0.0.0.0 | ||
FRONTEND_PORT=3000 | ||
|
||
TEXT_FILE_ENCODINGS=utf-8,latin1,cp1252,iso-8859-1 | ||
# Host port mapping for docker-compose (if not set, defaults are used in docker-compose.yml) | ||
FRONTEND_DOCKER_COMPOSE_PORT=3031 | ||
BACKEND_DOCKER_COMPOSE_PORT=8081 | ||
|
||
# Supported text file encodings | ||
TEXT_FILE_ENCODINGS=utf-8,latin1,cp1252,iso-8859-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
services: | ||
docetl: | ||
container_name: docetl-docwrangler-stack | ||
build: . | ||
image: docetl | ||
restart: unless-stopped | ||
healthcheck: | ||
test: ["CMD", "curl", "-f", "http://localhost:8000/health"] | ||
interval: 30s | ||
timeout: 10s | ||
retries: 3 | ||
start_period: 40s | ||
ports: | ||
# Map host ports to container ports using environment variables. | ||
# If FRONTEND_DOCKER_COMPOSE_PORT is not set, default to 3031. | ||
- "${FRONTEND_DOCKER_COMPOSE_PORT:-3031}:3000" | ||
# If BACKEND_DOCKER_COMPOSE_PORT is not set, default to 8081. | ||
- "${BACKEND_DOCKER_COMPOSE_PORT:-8081}:8000" | ||
environment: | ||
# Pass environment variables from the .env file (or host environment) | ||
# with default values if they are not defined. | ||
# Authentication | ||
- OPENAI_API_KEY=${OPENAI_API_KEY:-your_api_key_here} | ||
|
||
# Backend Configuration | ||
- BACKEND_ALLOW_ORIGINS=${BACKEND_ALLOW_ORIGINS:-http://localhost:3000,http://127.0.0.1:3000} | ||
- BACKEND_HOST=${BACKEND_HOST:-0.0.0.0} | ||
- BACKEND_PORT=${BACKEND_PORT:-8000} | ||
- BACKEND_RELOAD=${BACKEND_RELOAD:-True} | ||
|
||
# Frontend Configuration | ||
- FRONTEND_HOST=${FRONTEND_HOST:-0.0.0.0} | ||
- FRONTEND_PORT=${FRONTEND_PORT:-3000} | ||
|
||
# File Processing | ||
- TEXT_FILE_ENCODINGS=${TEXT_FILE_ENCODINGS:-utf-8,latin1,cp1252,iso-8859-1} | ||
volumes: | ||
# Mount the named volume "docetl-data" to /docetl-data in the container. | ||
- docetl-data:/docetl-data | ||
|
||
volumes: | ||
# Define a named volume for persistent data. | ||
docetl-data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "docet-website", | ||
"name": "docwrangler", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
|