-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (32 loc) · 768 Bytes
/
Makefile
File metadata and controls
43 lines (32 loc) · 768 Bytes
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
# Makefile for managing Docker Compose commands
.PHONY: build up down logs shell migrate migrate-down test lint format
# Build the Docker images using docker-compose
build:
docker-compose build
# Start the containers in detached mode
up:
docker-compose up -d
# Follow container logs
logs:
docker-compose logs -f
# Stop the running containers
down:
docker-compose down
# Open a shell in a container
shell:
docker-compose exec api /bin/bash
# Run migrations
migrate:
docker-compose exec api alembic upgrade head
# Rollback migrations
migrate-down:
docker-compose exec api alembic downgrade -1
# Run tests
test:
docker-compose exec api pytest
# Run linting
lint:
docker-compose exec api flake8 .
# Format code
format:
docker-compose exec api black .