Skip to content

Commit 628691d

Browse files
committed
Merge branch 'release/2.5.7' into devmode-vite
2 parents b4bbfa4 + 6dd2b5a commit 628691d

7 files changed

+59929
-678
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# nystudio107/devmode Change Log
22

3+
## 2.5.7 - 2022.04.06
4+
### Changed
5+
* Updated to latest `composer.json` and `package.json` deps
6+
* Switched over to using a script for db seeding
7+
38
## 2.5.6 - 2022.03.30
49
### Changed
510
* Fix `WORKDIR` in `php-prod-craft` container so `make craft` etc. commands work as expected

buildchain/package-lock.json

+566-499
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cms/composer.lock

+113-178
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

db-seed/db_init.sh

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
POSTGRES_DB_SEED_DIR="dbs"
3+
POSTGRES_DATABASES_ARRAY=( $POSTGRES_DATABASES )
4+
5+
# Iterate through the databases we need to create & seed
6+
for POSTGRES_DB in "${POSTGRES_DATABASES_ARRAY[@]}"
7+
do
8+
# Define the client command used
9+
pgsql=( psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" )
10+
echo "### Creating user \`$POSTGRES_USER\`"
11+
echo "CREATE USER $POSTGRES_DB ;" | "${pgsql[@]}"
12+
echo "### Creating database \`$POSTGRES_DB\`"
13+
echo "CREATE DATABASE $POSTGRES_DB ;" | "${pgsql[@]}"
14+
echo "### Granting ALL on database \`$POSTGRES_DB\`"
15+
echo "GRANT ALL PRIVILEGES ON DATABASE $POSTGRES_DB TO $POSTGRES_DB ;" | "${pgsql[@]}"
16+
# Add the database name to the command
17+
pgsql+=( "$POSTGRES_DB" )
18+
echo "### Seeding database \`$POSTGRES_DB\`"
19+
cat "/docker-entrypoint-initdb.d/$POSTGRES_DB_SEED_DIR/$POSTGRES_DB.sql" | "${pgsql[@]}" >/dev/null
20+
echo "### \`$POSTGRES_DB\` database seeded"
21+
done

db-seed/dbs/project.sql

+59,223
Large diffs are not rendered by default.
Binary file not shown.

docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ services:
5858
env_file:
5959
*env
6060
environment:
61-
POSTGRES_DB: project
61+
POSTGRES_DATABASES: "project"
6262
POSTGRES_USER: project
6363
POSTGRES_PASSWORD: project
6464
init: true

0 commit comments

Comments
 (0)