File tree 2 files changed +31
-0
lines changed
2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Local maintenance utilities
2
+
3
+ This directory contains scripts to help running and maintaining the Flagsmith
4
+ API in the local environment.
5
+
6
+ ## Requirements
7
+
8
+ - Docker
9
+
10
+ That's it. These scripts are designed to interact with the application runtime
11
+ through ephemeral Docker containers.
12
+
13
+ ## Scripts
14
+
15
+ ### ` bin/run `
16
+
17
+ Runs any command within the ` api ` container. Examples:
18
+
19
+ - ` bin/run ` — runs pending migrations and starts the API HTTP server in dev mode.
20
+ - ` bin/run bash ` — starts a bash shell in the API container.
21
+ - ` bin/run python manage.py makemigrations ` — runs the command in the API container.
22
+ - ` bin/run flagsmith createsuperuser ` — the Flagsmith CLI should be there too!
23
+ - ` bin/run pytest --sw --pdb api/tests/unit/test_my_feature.py ` — you get it.
24
+
25
+ > This script is intended as a one-command option to run Flagsmith code with no
26
+ > previous setup except from installing Docker.
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ #
3
+ # Runs any command from within an application container.
4
+ # If no command is given, it runs the application's default command.
5
+ docker compose -f docker/new/docker-compose.yml run --rm $( [ $# -eq 0 ] && echo --service-ports --use-aliases) api " $@ "
You can’t perform that action at this time.
0 commit comments