Skip to content

initial docker config#29

Closed
kernelism wants to merge 55 commits intomasterfrom
docker
Closed

initial docker config#29
kernelism wants to merge 55 commits intomasterfrom
docker

Conversation

@kernelism
Copy link
Collaborator

Setup docker to work with mxtoai. Did a local test. The apis did startup, but couldn't tests every handle yet.

Ollama can be made optional by editing compose or by manually specifying the services while running compose up. Ollama is over 2.5 gigs to better to not include unless needed.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented May 26, 2025

Deploying mxtoai-backend with  Cloudflare Pages  Cloudflare Pages

Latest commit: b7773c4
Status: ✅  Deploy successful!
Preview URL: https://57e5f987.mxtoai-backend.pages.dev
Branch Preview URL: https://docker.mxtoai-backend.pages.dev

View logs

Comment on lines +22 to +24
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
restart: unless-stopped
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's not hardcode this, it should be wired from .env file

image: redis:7-alpine
container_name: redis
ports:
- "6379:6379"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add auth, env variable for REDIS_PASSWORD or something

- "8000:8000"
environment:
- REDIS_URL=redis://redis:6379/0
- RABBITMQ_URL=amqp://guest:guest@rabbitmq:5672/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

username and passwords should be wired from .env

RUN poetry config virtualenvs.create false && poetry install --no-root --no-interaction --no-ansi

# Copy the rest of the application
COPY . .
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is too permissive, let's copy only the modules that are needed i.e. /mxtoai

COPY . .

# Expose API port (change as needed)
EXPOSE 8000
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's not expose it here, should be done in docker ocmpose

EXPOSE 8000

# Run the API
CMD ["poetry", "run", "python", "run_api.py"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to run it via uvicorn, for example this is the command we use in prod uvicorn mxtoai.api:app --host 0.0.0.0 --port 9292 --workers 4

WORKDIR /app

# Install Poetry
ENV POETRY_VERSION=2.1.3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's not fix the poetry version, this can be omitted

WORKDIR /app

# Install Poetry
ENV POETRY_VERSION=2.1.3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as pervious comment

RUN poetry config virtualenvs.create false && poetry install --no-root --no-interaction --no-ansi

# Copy rest of the worker code
COPY . .
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as pervious comment

Comment on lines +62 to +63
volumes:
- .:/app
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this?

Comment on lines +82 to +83
volumes:
- .:/app
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same, this looks very permissive, why do we need this

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we only need this for model-config, nothing else, maybe put model-config under credentials directory and mount as volume.

satwikkansal and others added 28 commits June 4, 2025 21:12
Fix bold marker being confused for list item
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Add PDF export handle and tool
Fix other domain validation issue
* Add independent search tools and guidelines

* Fix bug with brave search
Formatting fixes and run ruff
Skip processing AWS system emails
@kernelism kernelism closed this Jul 4, 2025
@BhaveshKukreja29 BhaveshKukreja29 deleted the docker branch January 12, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants