feat: VivesPOS landing on Winter CMS 1.2 — theme + plugin + Dockerfile
Some checks are pending
Module sub-split / Sub-split (push) Waiting to run
Some checks are pending
Module sub-split / Sub-split (push) Waiting to run
- Base: wintercms/winter branch 1.2 (full framework) - Theme vivespos: Canvas 7 + Bootstrap 5 CDN, custom CSS - Layout: deferred GTM/GA4 tracking, JSON-LD SoftwareApplication - Partials: hero (offline-first), features, modes (offline/nube toggle), screenshots, pricing (3 planes), comparison, FAQ, CTA - Plugin VivesPOS.Site with ContactForm - Dockerfile: PHP 8.2 Apache, port 80, healthcheck - Added winter/wn-pages, blog, sitemap, seo plugins - Active theme set to vivespos
This commit is contained in:
51
.devcontainer/local-features/bootstrap-winter/bootstrap.sh
Executable file
51
.devcontainer/local-features/bootstrap-winter/bootstrap.sh
Executable file
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ ! -d "${PWD}/vendor" ] && [ ! -f "${PWD}/composer.lock" ]; then
|
||||
echo "### Updating Composer dependencies"
|
||||
php ${PWD}/.devcontainer/local-features/bootstrap-winter/update-composer.php
|
||||
composer update --no-interaction --no-scripts --no-audit
|
||||
fi
|
||||
|
||||
if [ ! -f "${PWD}/.env" ]; then
|
||||
echo "### Generating .env file"
|
||||
php artisan winter:env -q
|
||||
php artisan key:generate -q
|
||||
fi
|
||||
|
||||
if [ "${DB_CONNECTION}" = "sqlite" ] && [ "${DB_DATABASE}" = "${PWD}/storage/database.sqlite" ] && [ ! -f "${PWD}/storage/database.sqlite" ]; then
|
||||
SETUP_ADMIN=true
|
||||
echo "### Creating SQLite database"
|
||||
touch storage/database.sqlite
|
||||
fi
|
||||
|
||||
echo "### Run migrations"
|
||||
php artisan migrate
|
||||
|
||||
echo "### Set theme"
|
||||
php artisan theme:use workshop
|
||||
|
||||
if [ "${SETUP_ADMIN}" = true ]; then
|
||||
echo "### Setup admin"
|
||||
php artisan winter:passwd admin admin
|
||||
fi
|
||||
|
||||
echo "### Ignoring files in Git"
|
||||
echo "plugins/*" >> "${PWD}/.git/info/exclude"
|
||||
echo "themes/*" >> "${PWD}/.git/info/exclude"
|
||||
echo "composer.json" >> "${PWD}/.git/info/exclude"
|
||||
git update-index --assume-unchanged composer.json
|
||||
git restore config
|
||||
|
||||
cp ${PWD}/.devcontainer/.vscode/launch.json ${PWD}/.vscode/launch.json
|
||||
|
||||
echo "### Mirror site to public directory"
|
||||
php artisan winter:mirror public
|
||||
|
||||
if [ "${CODESPACES}" = "true" ]; then
|
||||
echo "### Configure for Codespaces"
|
||||
php ${PWD}/.devcontainer/local-features/bootstrap-winter/codespaces.php
|
||||
git update-index --assume-unchanged config/app.php
|
||||
gh codespace ports visibility 8000:public -c $CODESPACE_NAME
|
||||
fi
|
||||
25
.devcontainer/local-features/bootstrap-winter/codespaces.php
Normal file
25
.devcontainer/local-features/bootstrap-winter/codespaces.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
$root = dirname(__DIR__, 3);
|
||||
|
||||
require_once $root . '/vendor/autoload.php';
|
||||
|
||||
use Winter\LaravelConfigWriter\ArrayFile;
|
||||
use Winter\LaravelConfigWriter\EnvFile;
|
||||
|
||||
$config = ArrayFile::open($root . '/config/app.php');
|
||||
|
||||
$config->set('trustedHosts', [
|
||||
'localhost',
|
||||
'^(.+\.)?app.github.dev',
|
||||
]);
|
||||
$config->set('trustedProxies', '*');
|
||||
|
||||
$config->write();
|
||||
|
||||
$env = EnvFile::open($root . '/.env');
|
||||
|
||||
$env->set('APP_URL', 'https://' . $_ENV['CODESPACE_NAME'] . '.app.github.dev');
|
||||
$env->set('LINK_POLICY', 'force');
|
||||
|
||||
$env->write();
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"id": "bootstrap-winter",
|
||||
"name": "Bootstrap Winter",
|
||||
"description": "Bootstrap and configure Winter CMS automatically for development on Winter itself",
|
||||
"postCreateCommand": "sh ./.devcontainer/local-features/bootstrap-winter/bootstrap.sh"
|
||||
}
|
||||
8
.devcontainer/local-features/bootstrap-winter/install.sh
Executable file
8
.devcontainer/local-features/bootstrap-winter/install.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
# Install Xdebug extension
|
||||
install-php-extensions xdebug
|
||||
|
||||
echo "Done"
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
$composerPath = dirname(__DIR__, 3) . '/composer.json';
|
||||
$composer = json_decode(file_get_contents($composerPath), true);
|
||||
|
||||
$packages = [
|
||||
'winter/wn-test-plugin' => 'dev-main',
|
||||
'winter/wn-blog-plugin' => 'dev-main',
|
||||
'winter/wn-blog-plugin' => 'dev-main',
|
||||
'winter/wn-workshop-theme' => 'dev-main',
|
||||
];
|
||||
|
||||
// Install Winter packages
|
||||
foreach ($packages as $package => $version) {
|
||||
if (!in_array($package, array_keys($composer['require']))) {
|
||||
$composer['require'][$package] = $version;
|
||||
}
|
||||
}
|
||||
|
||||
// Change Merge plugin config
|
||||
$composer['extra']['merge-plugin']['include'] = [
|
||||
'plugins/*/*/composer.json',
|
||||
];
|
||||
|
||||
file_put_contents(
|
||||
$composerPath,
|
||||
json_encode($composer, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)
|
||||
);
|
||||
Reference in New Issue
Block a user