Open Algorithmic Trading platform from: https://github.com/marketcalls/openalgo/
1.2K
Checkout the original repo etc. @ https://github.com/marketcalls/openalgo/
This document provides instructions for building, configuring, and running the OpenAlgo Docker image. It covers the essential information typically found on DockerHub image pages.
Clone the repository:
git clone https://github.com/p2c2e/openalgo.git
cd openalgo
Create your environment file:
cp .sample.env .env
Edit .env and set the required values (see below).
Build and run with Docker Compose:
docker-compose up --build
Or, to run in detached mode:
docker-compose up -d
To build the Docker image yourself (without Compose):
docker build -t openalgo:latest .
With Docker Compose (recommended):
docker-compose up
With Docker CLI:
docker run -d \
--name openalgo-web \
--env-file .env \
-p 5000:5000 \
-p 8765:8765 \
-v $(pwd)/db:/app/db \
-v $(pwd)/logs:/app/logs \
-v $(pwd)/.env:/app/.env:ro \
openalgo:latest
.env file..sample.env as a template and copy to .env.BROKER_API_KEYBROKER_API_SECRETAPP_KEYAPI_KEY_PEPPERDATABASE_URL./db:/app/db — SQLite database and persistent data./logs:/app/logs — Application logs./.env:/app/.env:ro — Environment configuration (read-only)5000 — Main web application (Flask)8765 — WebSocket server/app/start.sh (included in the image).appuser (non-root).services:
openalgo:
image: openalgo:latest
build:
context: .
dockerfile: Dockerfile
container_name: openalgo-web
ports:
- "${FLASK_PORT:-5000}:5000"
- "${WEBSOCKET_PORT:-8765}:8765"
volumes:
- ./db:/app/db
- ./logs:/app/logs
- ./.env:/app/.env:ro
environment:
- FLASK_ENV=${FLASK_ENV:-production}
- FLASK_DEBUG=${FLASK_DEBUG:-0}
restart: unless-stopped
# Build and start (foreground)
docker-compose up --build
# Start in detached mode
docker-compose up -d
# View logs
docker-compose logs -f
# Stop containers
docker-compose down
# Rebuild after changes
docker-compose up --build
# Enter container shell
docker-compose exec openalgo-web bash
# Check container status
docker-compose ps
Port already in use:
Check what's using the port and stop it, or change the port mapping in .env and docker-compose.yaml.
Database or log permission issues:
Ensure db/ and logs/ directories exist and are writable by Docker.
Container won't start:
Check logs with docker-compose logs and verify your .env file is correct.
Package installation issues:
Rebuild the image without cache:
docker-compose build --no-cache
docker-compose up
openalgo/
├── Dockerfile
├── docker-compose.yaml
├── .env
├── .sample.env
├── app.py
├── db/
├── logs/
└── ...
See the original OpenAlgo repo @ https://github.com/marketcalls/openalgo/
Content type
Image
Digest
sha256:4fe5c70e4…
Size
184.4 MB
Last updated
12 months ago
docker pull sudhan/openalgo