Skip to content

Commit ec06146

Browse files
ebretontiangolo
authored andcommitted
📝 Fix the paths of the scripts in README (fastapi#19)
* removed postgres_password from alembic.ini, read it from env var instead * ♻️ use f-strings for PostgreSQL URL * fix path to scripts
1 parent 7477722 commit ec06146

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

{{cookiecutter.project_slug}}/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ Nevertheless, if it doesn't detect a change but a syntax error, it will just sto
123123
To test the backend run:
124124

125125
```bash
126-
DOMAIN=backend sh ./script-test.sh
126+
DOMAIN=backend sh ./scripts/test.sh
127127
```
128128

129-
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.
129+
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.
130130

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

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

402402
```bash
403-
STACK_NAME={{cookiecutter.docker_swarm_stack_name_staging}} sh ./script-deploy.sh
403+
STACK_NAME={{cookiecutter.docker_swarm_stack_name_staging}} sh ./scripts/deploy.sh
404404
```
405405

406406
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:
@@ -417,7 +417,7 @@ services:
417417
- node.labels.${STACK_NAME}.app-db-data == true
418418
```
419419
420-
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:
420+
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:
421421

422422
```yaml
423423
version: '3'
@@ -506,10 +506,10 @@ Here are the steps in detail:
506506
* Set these environment variables, prepended to the next command:
507507
* `TAG=prod`
508508
* `FRONTEND_ENV=production`
509-
* Use the provided `script-build.sh` file with those environment variables:
509+
* Use the provided `scripts/build.sh` file with those environment variables:
510510

511511
```bash
512-
TAG=prod FRONTEND_ENV=production bash ./script-build.sh
512+
TAG=prod FRONTEND_ENV=production bash ./scripts/build.sh
513513
```
514514

515515
2. **Optionally, push your images to a Docker Registry**
@@ -521,10 +521,10 @@ If you are using a registry and pushing your images, you can omit running the pr
521521
* Set these environment variables:
522522
* `TAG=prod`
523523
* `FRONTEND_ENV=production`
524-
* Use the provided `script-build-push.sh` file with those environment variables:
524+
* Use the provided `scripts/build-push.sh` file with those environment variables:
525525

526526
```bash
527-
TAG=prod FRONTEND_ENV=production bash ./script-build.sh
527+
TAG=prod FRONTEND_ENV=production bash ./scripts/build-push.sh
528528
```
529529

530530
3. **Deploy your stack**
@@ -534,14 +534,14 @@ TAG=prod FRONTEND_ENV=production bash ./script-build.sh
534534
* `TRAEFIK_TAG={{cookiecutter.traefik_constraint_tag}}`
535535
* `STACK_NAME={{cookiecutter.docker_swarm_stack_name_main}}`
536536
* `TAG=prod`
537-
* Use the provided `script-deploy.sh` file with those environment variables:
537+
* Use the provided `scripts/deploy.sh` file with those environment variables:
538538

539539
```bash
540540
DOMAIN={{cookiecutter.domain_main}} \
541541
TRAEFIK_TAG={{cookiecutter.traefik_constraint_tag}} \
542542
STACK_NAME={{cookiecutter.docker_swarm_stack_name_main}} \
543543
TAG=prod \
544-
bash ./script-deploy.sh
544+
bash ./scripts/deploy.sh
545545
```
546546

547547
---

0 commit comments

Comments
 (0)