You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Makefile
+15-2Lines changed: 15 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -31,8 +31,19 @@ $(VENV_ACTIVATE):
31
31
32
32
venv: $(VENV_ACTIVATE)## Create a new (empty) virtual environment
33
33
34
-
start:
35
-
$(LOCAL_ENV) docker compose up --build --detach --wait
34
+
start: ## Start LocalStack
35
+
@test -n "${LOCALSTACK_AUTH_TOKEN}"|| (echo "LOCALSTACK_AUTH_TOKEN is not set. Find your token at https://app.localstack.cloud/workspace/auth-token";exit 1)
36
+
$(LOCAL_ENV) LOCALSTACK_AUTH_TOKEN=$(LOCALSTACK_AUTH_TOKEN) docker compose up --build --detach --wait
37
+
38
+
stop: ## Stop LocalStack
39
+
docker compose down
40
+
41
+
ready: ## Wait until LocalStack is ready
42
+
@echo Waiting on the LocalStack container...
43
+
@localstack wait -t 30 &&echo LocalStack is ready to use!|| (echo Gave up waiting on LocalStack, exiting. &&exit 1)
-A valid [LocalStack for AWS license](https://localstack.cloud/pricing). Your license provides a [`LOCALSTACK_AUTH_TOKEN`](https://docs.localstack.cloud/getting-started/auth-token/) to activate LocalStack.
-[CDK](https://docs.localstack.cloud/user-guide/integrations/aws-cdk/) with the [`cdklocal`](https://github.com/localstack/aws-cdk-local) wrapper.
15
15
16
-
17
-
Start LocalStack Pro with the `LOCALSTACK_AUTH_TOKEN` pre-configured:
16
+
## Start LocalStack
17
+
18
+
Start LocalStack with the `LOCALSTACK_AUTH_TOKEN` pre-configured:
18
19
19
20
```bash
20
21
export LOCALSTACK_AUTH_TOKEN=<your-auth-token>
21
-
docker-compose up
22
+
make start
23
+
make ready
22
24
```
23
25
24
-
The Docker Compose file will start LocalStack Pro container and a Postgres container. The Postgres container will be used to showcase how to reach a database external to LocalStack.
26
+
The Docker Compose file will start LocalStack container and a Postgres container. The Postgres container will be used to showcase how to reach a database external to LocalStack.
0 commit comments