Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds example config files in statically since the dynamic retrieval was disabled in previous PR #4378

Merged
merged 3 commits into from
Feb 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions sites/platform/static/files/fetch/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
appyaml
config-examples
config-examples-platform
gatsby
gatsby/*
lando
multiappyaml
routesyaml
servicesyaml
# multiappyaml
# routesyaml
# servicesyaml
186 changes: 186 additions & 0 deletions sites/platform/static/files/fetch/appyaml/akeneo
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
# This file describes an application.

# The name of this app. Must be unique within a project.
name: akeneo

# The language and version to use to run the application.
type: php:8.0

dependencies:
php:
composer/composer: '^2'

# Enable non-default extensions required by Akeneo
runtime:
extensions:
- apcu
- imagick
- memcached
- intl
# - amqp
- redis
- sodium

variables:
env:
APP_ENV: 'prod'
APP_DEBUG: 0
APP_DEFAULT_LOCALE: 'en_US'
APP_PRODUCT_AND_PRODUCT_MODEL_INDEX_NAME: 'akeneo_pim_product_and_product_model'
AKENEO_STARTER: minimal
# AKENEO_STARTER: icecat_demo_dev
# Update these for your desired Node version.
NODE_VERSION: v14.19.0
php:
apc.enable_cli: 1

build:
flavor: none

hooks:
# We run the build hook before your application has been packaged.
build: |
set -e

# Install composer dependencies.
composer install

# Install n to use newer version of node.
export N_PREFIX=$HOME/.n
export PATH=$N_PREFIX/bin:$PATH
curl -fsS https://raw.githubusercontent.com/platformsh/snippets/main/src/install_node.sh | { bash /dev/fd/3 -v $NODE_VERSION -y; } 3<&0

echo "Installing Node dependencies."
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 corepack yarn install
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 corepack yarn packages:build

echo "Installing assets."
php bin/console pim:installer:assets --symlink --clean -vvv
corepack yarn run less
corepack yarn update-extensions

echo "Running webpack."
corepack yarn run webpack

# We run the deploy hook after your application has been deployed and started.
deploy: |
set -e

echo "Warming cache"
rm -rf var/cache/*
php bin/console cache:warmup

STARTER_TRACKING=installer/$AKENEO_STARTER.installed
CATALOG_PATH=vendor/akeneo/pim-community-dev/src/Akeneo/Platform/Bundle/InstallerBundle/Resources/fixtures

# run installer if no lockfile exists
if [ ! -f $STARTER_TRACKING ]; then

# Clear previous tracking files in case trying multiple.
rm -rf installer/*

# minimal catalog + fixtures.
if [ "$AKENEO_STARTER" = minimal ]; then
echo "Running the installer: $AKENEO_STARTER catalog + fixtures."
php bin/console pim:installer:db --env=$APP_ENV --catalog=$CATALOG_PATH/$AKENEO_STARTER
# Create the admin user (admin/admin). Change immediately.
php bin/console pim:user:create -n --admin admin admin [email protected] Admin Istrator $APP_DEFAULT_LOCALE
php bin/console cache:clear
touch $STARTER_TRACKING

# icecat_demo_dev catalog + fixtures.
elif [ "$AKENEO_STARTER" = icecat_demo_dev ]; then
echo "Running the installer: $AKENEO_STARTER catalog + fixtures."
php bin/console pim:installer:db --env=$APP_ENV --catalog=$CATALOG_PATH/$AKENEO_STARTER
# Note: no admin user is created, since `icecat_demo_dev` creates on automatically (admin/admin). Change immediately.
php bin/console cache:clear
touch $STARTER_TRACKING

else
echo "No profile given. Skipping installation."
fi
else
echo "Akeneo already installed. Skipping."
fi

# The relationships of the application with services or other applications.
# The left-hand side is the name of the relationship as it will be exposed
# to the application in the environment variable. The right-hand
# side is in the form `<service name>:<endpoint name>`.
relationships:
database: "db:mysql"
essearch: "search:elasticsearch"

# The configuration of app when it is exposed to the web.
web:
locations:
"/":
root: 'public'
passthru: '/index.php'

# The size of the persistent disk of the application (in MB).
disk: 2048

# The mounts that will be performed when the package is deployed.
mounts:
"var":
source: local
source_path: "var"
# Used to control the Platform.sh install process. Do not delete the file inside it.
"installer":
source: local
source_path: "installer"
"web":
source: local
source_path: "web"
"config/secrets":
source: local
source_path: "config/secrets"
# For media files
"public/media":
source: local
source_path: "public/media"
# For local generated files
"var/file_storage":
source: local
source_path: "var/file_storage"
# Sharing job files
"var/file_storage/jobs":
source: service
service: jobs
source_path: "var/file_storage/jobs"

crons:
refresh:
spec: '30 1 * * *'
commands:
start: 'php bin/console pim:versioning:refresh'
purge_versioning:
spec: '30 2 * * *'
commands:
start: 'php bin/console pim:versioning:purge –more-than-days 90'
update_data:
spec: '1 * * * *'
commands:
start: 'php bin/console akeneo:connectivity-audit:update-data'
purge_jobs:
spec: '20 0 1 * *'
commands:
start: 'php bin/console akeneo:batch:purge-job-execution'
aggregate:
spec: '30 4 * * *'
commands:
start: 'php bin/console pim:volume:aggregate'

workers:
queue:
disk: 512
commands:
start: |
php /app/bin/console akeneo:batch:job-queue-consumer-daemon

source:
operations:
auto-update:
command: |
curl -fsS https://raw.githubusercontent.com/platformsh/source-operations/main/setup.sh | { bash /dev/fd/3 sop-autoupdate; } 3<&0
159 changes: 159 additions & 0 deletions sites/platform/static/files/fetch/appyaml/drupal10
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
# This file describes an application. You can have multiple applications
# in the same project.
#
# See https://docs.platform.sh/configuration/app.html

# The name of this app. Must be unique within a project.
name: 'drupal'

# The runtime the application uses.
type: 'php:8.1'

dependencies:
php:
composer/composer: '^2.1'

runtime:
# Enable the redis extension so Drupal can communicate with the Redis cache.
extensions:
- redis
- sodium
- apcu
- blackfire

# The relationships of the application with services or other applications.
#
# The left-hand side is the name of the relationship as it will be exposed
# to the application in the PLATFORM_RELATIONSHIPS variable. The right-hand
# side is in the form `<service name>:<endpoint name>`.
relationships:
database: 'db:mysql'
redis: 'cache:redis'

# The size of the persistent disk of the application (in MB).
disk: 2048

# The 'mounts' describe writable, persistent filesystem mounts in the application.
mounts:
# The default Drupal files directory.
'/web/sites/default/files':
source: local
source_path: 'files'
# Drupal gets its own dedicated tmp directory. The settings.platformsh.php
# file will automatically configure Drupal to use this directory.
'/tmp':
source: local
source_path: 'tmp'
# Private file uploads are stored outside the web root. The settings.platformsh.php
# file will automatically configure Drupal to use this directory.
'/private':
source: local
source_path: 'private'
# Drush needs a scratch space for its own caches.
'/.drush':
source: local
source_path: 'drush'
# Drush will try to save backups to this directory, so it must be
# writeable even though you will almost never need to use it.
'/drush-backups':
source: local
source_path: 'drush-backups'
# Drupal Console will try to save backups to this directory, so it must be
# writeable even though you will almost never need to use it.
'/.console':
source: local
source_path: 'console'

# Configuration of the build of this application.
build:
flavor: composer

# The hooks executed at various points in the lifecycle of the application.
hooks:
# The build hook runs after Composer to finish preparing up your code.
# No services are available but the disk is writeable.
build: |
set -e
# The deploy hook runs after your application has been deployed and started.
# Code cannot be modified at this point but the database is available.
# The site is not accepting requests while this script runs so keep it
# fast.
deploy: |
set -e
php ./drush/platformsh_generate_drush_yml.php
# if drupal is installed, will call the following drush commands:
# - `cache-rebuild`
# - `updatedb`
# - and if config files are present, `config-import`
cd web
bash $PLATFORM_APP_DIR/drush/platformsh_deploy_drupal.sh

# The configuration of app when it is exposed to the web.
web:
locations:
# All requests not otherwise specified follow these rules.
'/':
# The folder from which to serve static assets, for this location.
#
# This is a filesystem path, relative to the application root.
root: 'web'

# How long to allow static assets from this location to be cached.
#
# Can be a time in seconds, or -1 for no caching. Times can be
# suffixed with "s" (seconds), "m" (minutes), "h" (hours), "d"
# (days), "w" (weeks), "M" (months, as 30 days) or "y" (years, as
# 365 days).
expires: 5m

# Redirect any incoming request to Drupal's front controller.
passthru: '/index.php'

# Deny access to all static files, except those specifically allowed below.
allow: false

# Rules for specific URI patterns.
rules:
# Allow access to common static files.
'\.(avif|webp|jpe?g|png|gif|svgz?|css|js|map|ico|bmp|eot|woff2?|otf|ttf)$':
allow: true
'^/robots\.txt$':
allow: true
'^/sitemap\.xml$':
allow: true

# Deny direct access to configuration files.
'^/sites/sites\.php$':
scripts: false
'^/sites/[^/]+/settings.*?\.php$':
scripts: false

# The files directory has its own special configuration rules.
'/sites/default/files':
# Allow access to all files in the public files directory.
allow: true
expires: 5m
passthru: '/index.php'
root: 'web/sites/default/files'

# Do not execute PHP scripts from the writeable mount.
scripts: false

rules:
# Provide a longer TTL (2 weeks) for aggregated CSS and JS files.
'^/sites/default/files/(css|js)':
expires: 2w

crons:
# Run Drupal's cron tasks every 19 minutes.
drupal:
spec: '*/19 * * * *'
commands:
start: 'cd web ; drush core-cron'

source:
operations:
auto-update:
command: |
curl -fsS https://raw.githubusercontent.com/platformsh/source-operations/main/setup.sh | { bash /dev/fd/3 sop-autoupdate; } 3<&0

Loading
Loading