forked from hummingbot/hummingbot-api
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (38 loc) · 1.08 KB
/
Makefile
File metadata and controls
48 lines (38 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.PHONY: setup run deploy stop install uninstall build install-pre-commit
SETUP_SENTINEL := .setup-complete
setup: $(SETUP_SENTINEL)
$(SETUP_SENTINEL):
chmod +x setup.sh
./setup.sh
# Run locally (dev mode)
run:
docker compose up emqx postgres -d
conda run --no-capture-output -n hummingbot-api uvicorn main:app --reload
# Deploy with Docker
deploy: $(SETUP_SENTINEL)
docker compose up -d
# Stop all services
stop:
docker compose down
# Install conda environment
install:
@if ! command -v conda >/dev/null 2>&1; then \
echo "Error: Conda is not found in PATH. Please install Conda or add it to your PATH."; \
exit 1; \
fi
@if conda env list | grep -q '^hummingbot-api '; then \
echo "Environment already exists."; \
else \
conda env create -f environment.yml; \
fi
$(MAKE) install-pre-commit
$(MAKE) setup
uninstall:
conda env remove -n hummingbot-api -y
rm -f $(SETUP_SENTINEL)
install-pre-commit:
conda run -n hummingbot-api pip install pre-commit
conda run -n hummingbot-api pre-commit install
# Build Docker image
build:
docker build -t hummingbot/hummingbot-api:latest .