-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (37 loc) · 1.06 KB
/
Makefile
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
49
50
# Makefile for RealTimeBinanceMonitor
.PHONY: all build up down clean logs init-db
# Default target
all: build up
rebuild: clean build up
# Build the Docker images without using cache
build:
@echo "Building Docker images..."
docker compose build --no-cache
# Start the Docker containers in detached mode
up:
@echo "Starting Docker containers..."
docker compose up -d
# Stop the Docker containers
down:
@echo "Stopping Docker containers..."
docker compose down
# Remove Docker volumes
clean:
@echo "Removing Docker volumes..."
docker compose down -v
docker volume rm timescaledb || true
# Show logs for all containers
logs:
@echo "Showing logs for all containers..."
docker compose logs -f
db-shell:
docker exec -it timescaledb psql -U postgres -d hft
#run:
# go run backend/main.go
#run:
# @echo "Running the Go application..."
# DB_HOST=localhost DB_USER=postgres DB_PASSWORD=postgres DB_NAME=hft go run backend/main.go
# Run the Go application (for local development)
run:
@echo "Running the Go application..."
env $$(cat .env | xargs) go run backend/main.go