Skip to content

Commit

Permalink
Merge branch 'release/1.0.0-alpha.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
jalendport committed Jul 29, 2024
2 parents 2e6f278 + fae4e98 commit 276cb27
Show file tree
Hide file tree
Showing 15 changed files with 63 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Until https://github.com/prettier/prettier/pull/15526 is merged

*.md
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,21 @@

[![Common Changelog](https://common-changelog.org/badge.svg)](https://common-changelog.org)

## [1.0.0-alpha.2] - 2024-07-29

### Changed

- Update composer `post-create-project-cmd` script ([`968fe40`](https://github.com/jalendport/spark-craft/commit/968fe404472636d099b9bbfc0df05723b761b4f2))
- Reorganize some folders and files ([`2c8a483`](https://github.com/jalendport/spark-craft/commit/2c8a48375d713e97eff99abb865192cded98acbb), [`b3915ee`](https://github.com/jalendport/spark-craft/commit/b3915ee2307cd797181bf83f93da30f87aa0de4c))
- Bump fluid-tailwind to ^1.0.0 ([`79dfb3f`](https://github.com/jalendport/spark-craft/commit/79dfb3f9a167e7a8e900b3735e05f37b74a3e4da))

### Fixed

- Prevent queue container from crashing if mysql container isn’t ready or Craft isn’t installed ([`968fe40`](https://github.com/jalendport/spark-craft/commit/968fe404472636d099b9bbfc0df05723b761b4f2))

## [1.0.0-alpha.1] - 2024-07-25

_Initial release_

[1.0.0-alpha.2]: https://github.com/jalendport/spark-craft/releases/tag/1.0.0-alpha.2
[1.0.0-alpha.1]: https://github.com/jalendport/spark-craft/releases/tag/1.0.0-alpha.1
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jalendport/spark-craft",
"description": "Craft CMS starter project",
"version": "1.0.0-alpha.1",
"version": "1.0.0-alpha.2",
"type": "project",
"keywords": [
"craft",
Expand Down Expand Up @@ -58,9 +58,10 @@
},
"scripts": {
"post-create-project-cmd": [
"@php -r \"file_exists('.env') || copy('.example.env', '.env');\"",
"@php -r \"unlink('composer.json');\"",
"@php -r \"rename('composer.json.project', 'composer.json');\"",
"@php -r \"file_exists('.env') || rename('.env.example', '.env');\"",
"@php craft setup/keys",
"@php -r \"file_exists('composer.json.project') && unlink('composer.json');\"",
"@php -r \"file_exists('composer.json.project') && rename('composer.json.project', 'composer.json');\"",
"@composer dump-autoload -o"
]
}
Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions config/docker/queue/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM jalendport/spark-php:8.3-cli

COPY ./run_queue.sh /app-tmp/run_queue.sh
RUN chmod a+x /app-tmp/run_queue.sh

ARG UID
ARG GID

Expand All @@ -16,4 +19,7 @@ RUN adduser -G spark --system -D -s /bin/sh -u ${UID} spark

USER spark

# Prevents the queue from running until the database is ready
ENTRYPOINT [ "/app-tmp/run_queue.sh" ]

CMD ["php", "craft", "queue/listen", "--verbose"]
28 changes: 28 additions & 0 deletions config/docker/queue/run_queue.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

set -e

# Source the .env file
if [ -f .env ]; then
export $(grep -v '^#' .env | xargs)
fi

echo "Waiting for the MySQL container to respond"
until eval "mysql -h $CRAFT_DB_SERVER -u $CRAFT_DB_USER -p$CRAFT_DB_PASSWORD $CRAFT_DB_DATABASE -e 'select 1' > /dev/null 2>&1"
do
sleep 1
done

echo "Waiting for vendor/autoload.php"
while [ ! -f "vendor/autoload.php" ] || [ ! -f "composer.lock" ]
do
sleep 1
done

echo "Waiting for Craft to be installed"
until eval "php craft install/check"
do
sleep 30
done

exec "$@"
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
postcssImport(),
postcssCustomSelectors(),
tailwindcssNesting(),
tailwindcss({ config: "config/build/tailwind.config.js" }),
tailwindcss({ config: "config/frontend/tailwind.config.js" }),
autoprefixer(),
],
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default defineConfig(({ command, mode }) => {
sourcemap: true,
},
css: {
postcss: "config/build",
postcss: "config/frontend",
},
plugins: [
compression({
Expand Down
2 changes: 1 addition & 1 deletion craft
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

// Load shared bootstrap
require __DIR__ . '/bootstrap.php';
require __DIR__ . '/config/craft/bootstrap.php';

// Load and run Craft
/** @var craft\console\Application $app */
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite --config ./config/build/vite.config.js",
"build": "vite build --config ./config/build/vite.config.js",
"preview": "vite preview --config ./config/build/vite.config.js"
"dev": "vite --config ./config/frontend/vite.config.js",
"build": "vite build --config ./config/frontend/vite.config.js",
"preview": "vite preview --config ./config/frontend/vite.config.js"
},
"dependencies": {
"vue": "^3.4.0"
Expand All @@ -16,7 +16,7 @@
"@vitejs/plugin-legacy": "^5.4.0",
"@vitejs/plugin-vue": "^5.0.0",
"autoprefixer": "^10.4.0",
"fluid-tailwind": "^0.3.0",
"fluid-tailwind": "^1.0.0",
"postcss": "^8.4.0",
"postcss-custom-selectors": "^7.1.0",
"postcss-import": "^16.1.0",
Expand Down
2 changes: 1 addition & 1 deletion web/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

// Load shared bootstrap
require dirname(__DIR__) . '/bootstrap.php';
require dirname(__DIR__) . '/config/craft/bootstrap.php';

// Load and run Craft
/** @var craft\web\Application $app */
Expand Down

0 comments on commit 276cb27

Please sign in to comment.