-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
63 lines (47 loc) · 1.25 KB
/
justfile
File metadata and controls
63 lines (47 loc) · 1.25 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
# Justfile for League Labs Scheduler
# Set environment variables
set export
FLASK_APP := "wsgi:app"
# Run the Flask development server
dev:
flask run --host=0.0.0.0 --debug
# Recreate the database (deletes and recreates)
recreate-db:
python3 init_db.py
build:
docker build -t flaskapp .
# Run the Docker application with all services
run:
docker compose up --build
# Run Docker in detached mode
run-detached:
docker compose up -d --build
# Stop Docker containers
stop:
docker compose down
# Run Docker for development with local MongoDB access
dev-docker:
docker compose -f docker-compose.dev.yml up --build
######
# Database migration commands
# Initialize migrations (run once when setting up the project)
migrate-init:
flask db init
# Create a new migration
migrate-create message="database changes":
flask db migrate -m "{{message}}"
# Apply migrations in development environment
migrate-dev:
flask db upgrade
# Apply migrations in production environment
migrate-prod:
FLASK_ENV=production flask db upgrade
# Downgrade database to previous migration
migrate-down:
flask db downgrade
# Show migration history
migrate-history:
flask db history
# Show current migration
migrate-current:
flask db current