File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Welcome! :)
2
+
3
+ # Test/Dev
1
4
DEV_CMD =cd intbot && DJANGO_ENV="dev" uv run --env-file .env -- ./manage.py
2
5
TEST_CMD =cd intbot && DJANGO_SETTINGS_MODULE="intbot.settings" DJANGO_ENV="test" uv run pytest --nomigrations
3
6
7
+ # Docker
4
8
DOCKER_RUN_WITH_PORT =docker run -p 4672:4672 --add-host=host.internal:host-gateway -e DJANGO_ENV="local_container" -it intbot:$(V )
9
+ MANAGE =cd intbot && ./manage.py
5
10
11
+ # Deployment
12
+ DEPLOY_CMD =cd deploy && uvx --from "ansible-core" ansible-playbook -i hosts.yml
6
13
7
14
# mostly useful for docker and deployment
8
15
current_git_hash =$(shell git rev-parse HEAD)
@@ -48,9 +55,25 @@ in-container/gunicorn:
48
55
in-container/bot :
49
56
$(MANAGE ) run_bot
50
57
58
+ in-container/migrate :
59
+ $(MANAGE ) migrate
60
+
61
+
62
+ # Docker management targets
51
63
52
64
docker/build :
53
65
docker build . -t intbot:$(current_git_hash )
54
66
55
67
docker/run/gunicorn :
56
68
$(DOCKER_RUN_WITH_PORT ) make in-container/gunicorn
69
+
70
+
71
+ # Deploymenet targets
72
+ #
73
+ deploy/provision :
74
+ $(DEPLOY_CMD ) playbooks/01_setup.yml
75
+ $(DEPLOY_CMD ) playbooks/02_nginx.yml
76
+
77
+ deploy/app :
78
+ @echo " Deploying version $( V) to a remote server"
79
+ $(DEPLOY_CMD ) playbooks/03_app.yml --extra-vars " app_version=$( V) "
You can’t perform that action at this time.
0 commit comments