-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (31 loc) · 863 Bytes
/
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
.PHONY: build up down restart logs clean pdm-install
# Build the Docker images
build:
docker-compose build
# Start the services in the background
up:
docker-compose up -d
# Stop the services
down:
docker-compose down
# Restart the services
restart: down up
# View the logs of all services
logs:
docker-compose logs -f
# Remove containers, networks, volumes, and images created by `up`
clean:
docker-compose down -v
docker system prune -f
rm -rf ./uploads # Optional: clean any local directory
# Install dependencies using PDM inside the Docker container
pdm-install:
docker-compose run --rm app pdm install
# Enter the app container for interactive use
shell:
docker-compose run --rm app /bin/sh
# Run the main application
run-app:
docker-compose run --rm app pdm run python app/main.py
# Rebuild and run the services
rebuild: clean build up