Upsun Support Team
Posts
-
Custom 404 page for a static website
Problem At the moment, Platform.sh does not have the ability to define custom error pages. For a normal web application, you would generally already handle this in the app. But for a static websit...
-
Connecting to a remote MSSQL server
Goal This article describes how to configure your project so you can connect to MSSQL server. This article specifically looks at the drupal module sqlsrv https://www.drupal.org/project/sqlsrv but...
-
How to install a different ruby version on a php container
Problem In a php/node/… application container you sometimes also need ruby. By default, the version we install is 2.3.3 but it could be you need a different version Goal This article describes ho...
-
What is the 'tree' hash mentioned in the build?
Unique builds When you start a build platform mentions something like Building application 'application' (runtime type: php:7.4, tree: 4d307e3) That tree is used by Platform to determine if we can...
-
How to mount a single file
Mounting a single file is technically not possible. This is troublesome if you want to write to a file in the /app folder. But there is a trick that you can use to emulate the behavior. On your lo...
-
Make mysql automatically log in via a my.cnf
Problem If you ssh into your environment and try to connect to your database you will get an error web@app.0:~$ mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/r...
-
Activity Script: Environment Backup Failure Notification via SendGrid SMTP
Purpose: When the production environment backup fails, receive an email notification. Requirements: SendGrid API TODO: Store SENDGRID_API_KEY outside of the source code Query Platform.sh API to pu...
-
Fully automated dependency updates with source operations
This article is a follow up to the initial article that discussed using source ops for updates. The original article is still there for historic reasons. Goal Much of what we write these days is h...
-
Convert PLATFORM_RELATIONSHIPS to DATABASE_URL
GoalPLATFORM_RELATIONSHIPS contains the information you need to connect to your database. But you need to extract that information to use it in your app. We provide a laravel-bridge and symfony-fle...
-
Rate limit connections to your application using Varnish
Rate limit connections to your application using Varnish Problem Bots, bad users, bad actors can often use up PHP workers and CPU time by constantly making bad queries to your application. This ca...