Skip to content

Commit f7fc1ff

Browse files
committed
Cleaned up
1 parent 876f566 commit f7fc1ff

File tree

6 files changed

+16
-12
lines changed

6 files changed

+16
-12
lines changed

.env.local.database

Lines changed: 0 additions & 1 deletion
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@
1515
###< friendsofphp/php-cs-fixer ###
1616

1717
/node_modules/
18+
.env.local.database

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,12 @@ we decided to adhere to in this project.
213213
docker compose run --rm node yarn coding-standards-check
214214
```
215215

216+
* Shell scripts
217+
218+
```sh
219+
docker run --rm --tty --volume "$PWD:/app" peterdavehello/shellcheck shellcheck /app/bin/fetch-data
220+
```
221+
216222
### Coding standards apply
217223

218224
The following commands let you apply the coding standards

bin/fetch-data

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
set -o errexit -o errtrace -o noclobber -o nounset -o pipefail
33
IFS=$'\n\t'
44

5-
script_dir=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
6-
project_dir=$(cd $(dirname "$script_dir") && pwd)
7-
bold=$(tput -Txterm-256color bold)
8-
normal=$(tput -Txterm-256color sgr0)
5+
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
6+
project_dir=$(cd "$(dirname "$script_dir")" && pwd)
97

108
cd "$project_dir"
119

@@ -24,14 +22,14 @@ for i in "${!database_urls[@]}"; do
2422
fi
2523
done
2624

27-
next_index=$(( ($current_index+1) % "${#database_urls[@]}" ))
25+
next_index=$(( (current_index + 1) % "${#database_urls[@]}" ))
2826

2927
next_database_url="${database_urls[$next_index]}"
3028

31-
echo current_database_url: $current_database_url
32-
echo current_index: $current_index
33-
echo next_index: $next_index
34-
echo next_database_url: $next_database_url
29+
echo current_database_url: "$current_database_url"
30+
echo current_index: "$current_index"
31+
echo next_database_url: "$next_database_url"
32+
echo next_index: "$next_index"
3533

3634
docker compose exec --env DATABASE_URL="$next_database_url" phpfpm bin/console doctrine:migrations:migrate --no-interaction
3735
# @todo Fetch data

docker-compose.server.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ networks:
88

99
services:
1010
phpfpm:
11-
image: itkdev/php8.2-fpm:alpine
11+
image: itkdev/php8.1-fpm:alpine
1212
restart: unless-stopped
1313
networks:
1414
- app

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ services:
2121
#- ENCRYPT=1 # Uncomment to enable database encryption.
2222

2323
phpfpm:
24-
image: itkdev/php8.2-fpm:latest
24+
image: itkdev/php8.1-fpm:latest
2525
networks:
2626
- app
2727
extra_hosts:

0 commit comments

Comments
 (0)