-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
69 lines (55 loc) · 1.82 KB
/
Makefile
File metadata and controls
69 lines (55 loc) · 1.82 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Makefile for Vicky Chatbot Docker Management
.PHONY: help build run stop clean logs shell test
# Default target
help:
@echo "Vicky Chatbot Docker Commands:"
@echo " build - Build the Docker image"
@echo " run - Run the application with docker-compose"
@echo " run-prod - Run with nginx reverse proxy"
@echo " stop - Stop all running containers"
@echo " restart - Restart the application"
@echo " clean - Remove containers and images"
@echo " logs - View application logs"
@echo " shell - Access container shell"
@echo " test - Run tests in container"
@echo " push - Build and push to registry"
# Build the Docker image
build:
docker-compose build --no-cache
# Run the application in development mode
run:
docker-compose up -d
@echo "Application running at http://localhost:8000"
# Run with nginx reverse proxy for production
run-prod:
docker-compose --profile production up -d
@echo "Application running at http://localhost"
# Stop all containers
stop:
docker-compose down
# Restart the application
restart: stop run
# Clean up containers and images
clean:
docker-compose down --rmi all --volumes --remove-orphans
docker system prune -f
# View logs
logs:
docker-compose logs -f vicky-app
# Access container shell
shell:
docker-compose exec vicky-app bash
# Run tests inside container
test:
docker-compose exec vicky-app python -m pytest
# Build and push to registry (customize registry URL)
push:
docker build -t vicky-chatbot:latest .
# docker tag vicky-chatbot:latest your-registry/vicky-chatbot:latest
# docker push your-registry/vicky-chatbot:latest
# Development: run with file watching
dev:
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
# Check application health
health:
curl -f http://localhost:8000/api/info || echo "Application not responding"