Skip to content

Commit

Permalink
Copying Upsun config into platformsh config
Browse files Browse the repository at this point in the history
  • Loading branch information
romainruaud committed Jan 22, 2025
1 parent 483bea6 commit a85765e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 61 deletions.
10 changes: 9 additions & 1 deletion .platform/applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
composer/composer: "^2"

# The type of the application to build.
type: php:8.1
type: php:8.3
build:
flavor: composer

Expand Down Expand Up @@ -45,6 +45,9 @@
root: "public"
# The front-controller script to send non-static requests to.
passthru: "/index.php"
rules:
'^/api/bundles/(?<resourceName>.*)$':
passthru: '/bundles/$resourceName'

# The size of the persistent disk of the application (in MB).
disk: 2048
Expand Down Expand Up @@ -78,6 +81,11 @@
# The runtime the application uses.
# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
type: 'nodejs:18'

variables:
env:
NEXT_PUBLIC_API_ROUTE_PREFIX: 'api'
NEXT_PUBLIC_API_URL: 'https://upsun-deployment-config-3xlvpkq-kxux3rltbhsgo.fr-3.platformsh.site/api'

# The size of the persistent disk of the application (in MB). Minimum value is 128.
disk: 2048
Expand Down
62 changes: 4 additions & 58 deletions .platform/routes.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# Route / to default React App.
https://{default}/:
cache:
enabled: false
ssi:
enabled: false
type: upstream
upstream: api:http

https://{default}/admin:
cache:
cookies:
- '*'
Expand All @@ -20,58 +13,11 @@ https://{default}/admin:
type: upstream
upstream: admin:http

https://{default}/login:
# Route /api to Api platform app.
https://{default}/api:
cache:
cookies:
- '*'
default_ttl: 0
enabled: true
headers:
- Accept
- Accept-Language
ssi:
enabled: false
type: upstream
upstream: admin:http

https://{default}/_next:
cache:
cookies:
- '*'
default_ttl: 0
enabled: true
headers:
- Accept
- Accept-Language
ssi:
enabled: false
type: upstream
upstream: admin:http

https://{default}/locales:
cache:
cookies:
- '*'
default_ttl: 0
enabled: true
headers:
- Accept
- Accept-Language
ssi:
enabled: false
type: upstream
upstream: admin:http

https://{default}/images:
cache:
cookies:
- '*'
default_ttl: 0
enabled: true
headers:
- Accept
- Accept-Language
ssi:
enabled: false
type: upstream
upstream: admin:http
upstream: api:http
7 changes: 5 additions & 2 deletions .platform/services.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
postgresql:
type: postgresql:13
type: postgresql:15
disk: 256

opensearch:
Expand All @@ -9,7 +9,10 @@ opensearch:
plugins:
- analysis-icu
- analysis-phonetic
- opensearch-ml-plugin
- neural-search
- opensearch-knn

redis:
type: redis-persistent:6.2
type: redis-persistent:7.0
disk: 256

0 comments on commit a85765e

Please sign in to comment.