Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 53 additions & 50 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,50 +1,53 @@
###############################################################################
# Project‑specific exclusions / re‑includes
###############################################################################

# Obsolete
memory/**
instruments/**
knowledge/custom/**

# Logs, tmp, usr
logs/*
tmp/*
usr/*


# Keep .gitkeep markers anywhere
!**/.gitkeep


###############################################################################
# Environment / tooling
###############################################################################
.conda/
.cursor/
.venv/
.git/


###############################################################################
# Tests (root‑level only)
###############################################################################
/*.test.py


###############################################################################
# ─── LAST SECTION: universal junk / caches (MUST BE LAST) ───
# Put these at the *bottom* so they override any ! re‑includes above
###############################################################################
# OS / editor junk
**/.DS_Store
**/Thumbs.db

# Python caches / compiled artefacts
**/__pycache__/
**/*.py[cod]
**/*.pyo
**/*.pyd

# Environment files anywhere
*.env
# Git
.git
.gitignore

# Python
.venv
venv
__pycache__
*.py[cod]
*$py.class
*.so
.Python
*.egg-info
.eggs

# IDE
.idea
.vscode
*.swp
*.swo

# Node modules (if any)
node_modules

# Development files
*.md
.cursor
.claude
.codex

# Environment files (use Coolify's env vars instead)
.env
.env.*
!.env.example

# Test files
tests/
test_*.py
*_test.py

# Logs
*.log

# OS files
.DS_Store
Thumbs.db

# Temporary files
tmp/
temp/

# Don't exclude docker folder - we need it for build scripts!
# docker/
50 changes: 50 additions & 0 deletions Dockerfile.coolify
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Agent Zero - Coolify Deployment from Source
# Uses the official Kali Linux base image with your local source code

FROM agent0ai/agent-zero-base:latest

# Set branch to "local" to use copied files instead of cloning from GitHub
ENV BRANCH=local

# Copy filesystem files (scripts, configs, supervisor configs)
COPY ./docker/run/fs/ /

# Make sure scripts are executable
RUN chmod +x /ins/*.sh /exe/*.sh 2>/dev/null || true

# Pre-installation steps (apt update, SSH setup)
RUN bash /ins/pre_install.sh local

# === LAYER CACHING OPTIMIZATION ===
# Copy ONLY requirements files first - this layer gets cached if requirements don't change
COPY requirements.txt requirements2.txt /git/agent-zero/

# Install Python dependencies (cached layer - only rebuilds if requirements.txt changes)
RUN bash -c "source /opt/venv-a0/bin/activate && uv pip install -r /git/agent-zero/requirements.txt && uv pip install -r /git/agent-zero/requirements2.txt || true"

# NOW copy the rest of the source code (changes frequently, but doesn't invalidate pip cache)
COPY . /git/agent-zero

# Install playwright browsers
RUN bash /ins/install_playwright.sh local || true

# Preload A0 (preload models, prepare caches)
RUN bash -c "source /opt/venv-a0/bin/activate && python /git/agent-zero/preload.py --dockerized=true || true"

# Install additional software (if any)
RUN bash /ins/install_additional.sh local || true

# Post-installation steps
RUN bash /ins/post_install.sh local || true

# Set final permissions
RUN chmod +x /exe/initialize.sh /exe/run_A0.sh /exe/run_searxng.sh /exe/run_tunnel_api.sh

# Expose ports:
# - 80: Web UI
# - 22: SSH (for code execution)
# - 9000-9009: MCP/A2A services
EXPOSE 22 80 9000-9009

# Initialize runtime (copies A0 to /a0, starts supervisord)
CMD ["/exe/initialize.sh", "local"]
36 changes: 0 additions & 36 deletions DockerfileLocal

This file was deleted.

Loading