Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Commit

Permalink
📝 Fix location of scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo committed May 3, 2019
1 parent 85b6e92 commit 47d90f3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions {{cookiecutter.project_slug}}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ Nevertheless, if it doesn't detect a change but a syntax error, it will just sto
To test the backend run:

```bash
DOMAIN=backend sh ./script-test.sh
DOMAIN=backend sh ./scripts/test.sh
```

The file `./script-test.sh` has the commands to generate a testing `docker-stack.yml` file from the needed Docker Compose files, start the stack and test it.
The file `./scripts/test.sh` has the commands to generate a testing `docker-stack.yml` file from the needed Docker Compose files, start the stack and test it.

The tests run with Pytest, modify and add tests to `./backend/app/app/tests/`.

Expand Down Expand Up @@ -370,7 +370,7 @@ Then you need to have those constraints in your deployment Docker Compose file f
To be able to use different environments, like `prod` and `stag`, you should pass the name of the stack as an environment variable. Like:

```bash
STACK_NAME={{cookiecutter.docker_swarm_stack_name_staging}} sh ./script-deploy.sh
STACK_NAME={{cookiecutter.docker_swarm_stack_name_staging}} sh ./scripts/deploy.sh
```

To use and expand that environment variable inside the `docker-compose.deploy.volumes-placement.yml` files you can add the constraints to the services like:
Expand All @@ -387,7 +387,7 @@ services:
- node.labels.${STACK_NAME}.app-couchbase-data == true
```
note the `${STACK_NAME}`. In the script `./script-deploy.sh`, that `docker-compose.deploy.volumes-placement.yml` would be converted, and saved to a file `docker-stack.yml` containing:
note the `${STACK_NAME}`. In the script `./scripts/deploy.sh`, that `docker-compose.deploy.volumes-placement.yml` would be converted, and saved to a file `docker-stack.yml` containing:

```yaml
version: '3.3'
Expand Down Expand Up @@ -479,7 +479,7 @@ Here are the steps in detail:
* Use the provided `script-build.sh` file with those environment variables:

```bash
TAG=prod FRONTEND_ENV=production bash ./script-build.sh
TAG=prod FRONTEND_ENV=production bash ./scripts/build.sh
```

2. **Optionally, push your images to a Docker Registry**
Expand All @@ -494,7 +494,7 @@ If you are using a registry and pushing your images, you can omit running the pr
* Use the provided `script-build-push.sh` file with those environment variables:

```bash
TAG=prod FRONTEND_ENV=production bash ./script-build.sh
TAG=prod FRONTEND_ENV=production bash ./scripts/build-push.sh
```

3. **Deploy your stack**
Expand All @@ -511,7 +511,7 @@ DOMAIN={{cookiecutter.domain_main}} \
TRAEFIK_TAG={{cookiecutter.traefik_constraint_tag}} \
STACK_NAME={{cookiecutter.docker_swarm_stack_name_main}} \
TAG=prod \
bash ./script-deploy.sh
bash ./scripts/deploy.sh
```

---
Expand Down

0 comments on commit 47d90f3

Please sign in to comment.