This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "myapp" | |
stack: | |
- "nodejs@20" | |
hooks: | |
build: | | |
set -eux | |
npm install | |
npm run build | |
web: | |
commands: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set database environment variables | |
export DB_HOST="$MARIADB_HOST" | |
export DB_PORT="$MARIADB_PORT" | |
export DB_PATH="$MARIADB_PATH" | |
export DB_USERNAME="$MARIADB_USERNAME" | |
export DB_PASSWORD="$MARIADB_PASSWORD" | |
export DB_SCHEME="$MARIADB_SCHEME" | |
export DATABASE_URL="${DB_SCHEME}://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_PATH}" | |
# Set Laravel-specific environment variables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Cleanup | |
rm -rf env | |
rm -rf migrations | |
rm -rf Platformify_Cookies/static | |
rm -rf node_modules | |
platform tunnel:close -y | |
# Setup a virtual environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# pbt - Platform.sh Build Tools | |
# 1) build cache handling | |
# 2) common framework recipes | |
# | |
# What also could change? | |
# - any variable defined in variables in .platform.app.yaml | |
# - Using a specific variables.pbt for cache handling config | |
# - A forced rebuild environment variable (to catch other cases) | |
# - composability: resusing the caching logic for dirs and build deps --> cached-poetry; cached-pip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deploy: | |
name: 'Deploy to Platform.sh' | |
needs: [build-frontend, coder, install] | |
runs-on: ubuntu-latest | |
# Deploy to Platform.sh only for branches. | |
if: ${{ github.event_name == 'push' }} | |
env: | |
GITHUB_REF: ${{ github.event.ref }} | |
steps: | |
- name: Extract branch name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: magento | |
type: 'php:7.4' | |
build: | |
flavor: composer | |
hooks: | |
build: | | |
php ./vendor/bin/ece-tools build:generate | |
php ./vendor/bin/ece-tools build:transfer | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Post-deploy | |
on: | |
push: | |
branches-ignore: | |
- 'master' | |
env: | |
PLATFORMSH_CLI_TOKEN: ${{ secrets.CLI_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ACC_MIN: 0.80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"documentId": "de1c2adbb897effdfe0deae32a01035e46f932ce", | |
"rank": 1, | |
"relurl": "/configuration/app/web.html#locations", | |
"section": "Web", | |
"site": "docs", | |
"text": " The locations block is the most powerful, and potentially most involved, section of the .platform.app.yaml file. It allows you to control how the application container responds to incoming requests at a very fine-grained level. Common patterns also vary between language containers due to the way PHP-FPM handles incoming requests.\nEach entry of the locations block is an absolute URI path (with leading /) and its value includes the configuration directives for how the web server should handle matching requests. That is, if your domain is example.com then '/' means “requests for example.com/”, while '/admin' means “requests for example.com/admin”. If multiple blocks could match an incoming request then the most-specific will apply.\nweb:locations:'/':# Rules for all requests that don't oth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"site": "website", | |
"source": "secondary", | |
"rank": 3, | |
"documentId": "1f80afed50618a7f5be17adaaf31af33", | |
"title": "Web", | |
"description": "", | |
"text": " The web key defines a single web instance container running a single web server process (currently Nginx), behind which runs your application. The web key configures the web server, including what requests should be served directly (such as static files) and which should be passed to your application. The server is extremely flexible, which means that some configurations will be more involved than others. Additionally, defaults may vary somewhat between different language base images (specified by the type key of .platform.app.yaml). The first section on this page explains the various options the file supports. If you prefer, the later sections include various example configurations to demonstrate common patterns and configurations. You can also examine the .platform.app.yaml files of the provided proje |