title | description |
---|---|
PHP Overview |
Learn about working with Php with ease on Zerops. |
import DocCardList from '@theme/DocCardList'; import Icons from '@theme/Icon'; import LargeCardList from '@site/src/components/LargeCardList'; import LargeCard from '@site/src/components/LargeCard'; import CustomCard from '@site/src/components/CustomCard'; import DeployButton from '@site/src/components/DeployButton';
PHP ↗, a popular general-purpose scripting language that is especially suited to web development.
As said, there is no need for coding yet, we have created a Github repository ↗, a recipe, containing the most simple PHP web application. The repo will be used as a source from which the app will be built.
This is the most bare-bones example of PHP running on Zerops — as few libraries as possible, just a simple endpoint with connect, read and write to a Zerops PostgreSQL database.- Log in/sign up to Zerops GUI ↗
- In the Projects box click on Import a project and paste in the following yml config (source ↗):
project:
name: my-first-project
# Project mode (LIGHT or SERIOUS)
# The default is LIGHT, so it is not necessary to explicitly include it.
mode: LIGHT
tags:
- zerops-recipe
services:
- hostname: helloworld
type: [email protected]+2.4
minContainers: 1
maxContainers: 3
buildFromGit: https://github.com/zeropsio/recipe-php-hello-world@main
enableSubdomainAccess: true
- Click on Import project and wait until all pipelines have finished.
That's it, your application is now up and running! ⭐ Let's check it works:
- A subdomain should have been enabled and visible in the project's IP addressed & Public Routing Overview box. Its format should look similar to this
https://helloworld-24-8080.prg1.zerops.app
. - Click or the
subdomain
URL to open it in a browser and you should see
Hello, World!
:::tip Do you have any questions? Check the step-by-step tutorial, browse the documentation and join our Discord community to get help from our team and other members. :::
<DocCardList colSize={6} items={[ { type: 'link', href: '/php/getting-started', label: 'New to Zerops?', customProps: { icon: Icons['rocket-launch'], description: 'Learn the basics by following a simple example.', }, }, { type: 'link', href: '/php/how-to/create', label: 'Care for details?', customProps: { icon: Icons['academic-cap-solid'], description: 'Dive in all Zerops has to offer for your PHP application.', }, }, ]} />
<DocCardList colSize={4} items={[ { type: 'link', href: '/php/how-to/create', label: 'Create PHP service', customProps: { icon: Icons['php'], description: 'Start with creating a PHP service using GUI or zCLI.', }, }, { type: 'link', href: '/php/how-to/build-pipeline#add-zeropsyml-to-your-repository', label: 'zerops.yml', customProps: { icon: Icons['puzzle'], description: 'See a full example of zerops.yml file to create your own app.', }, }, { type: 'link', href: '/php/how-to/scaling', label: 'Scaling configuration', customProps: { icon: Icons['adjustments'], description: 'Set up scaling of your PHP application so that it runs smoothly while using only necessary resources.', }, }, ]} />
{" "}
<DocCardList colSize={6} items={[ { type: 'link', href: '/php/how-to/build-process#customize-php-build-environment', label: 'Customize build environment', customProps: { icon: Icons['sparkles'], }, }, { type: 'link', href: '/php/how-to/customize-runtime', label: 'Customize runtime environment', customProps: { icon: Icons['sparkles-solid'], }, }, ]} />
Don't know how to start or got stuck during the process? You might not be the first one, visit the FAQ section to find out.
In case you haven't found an answer (and also if you have), we and our community are looking forward to hearing from you on Discord.
Have you build something that others might find useful? Don't hesitate to share your knowledge!
<DocCardList colSize={6} items={[ { type: 'link', href: '/php/faq', label: 'FAQ', customProps: { icon: Icons['chat-bubble-left-right'], description: 'Most common questions in one place.', }, }, { type: 'link', href: 'https://discord.com/invite/WDvCZ54', label: 'Discord', customProps: { icon: Icons['discord'], description: 'Join our core team and Zerops community on Discord. Ask questions and share your tips with other members.', }, }, ]} />
<DocCardList colSize={6} items={[ { type: 'link', href: '/references/cli', label: 'zCLI', customProps: { icon: Icons['command-line'], description: 'Get even more out of Zerops with the zCLI command line tool.', }, }, { type: 'link', href: '/references/vpn', label: 'Zerops VPN', customProps: { icon: Icons['globe-europe'], description: 'Connect to your services easily with Zerops VPN.', }, }, ]} />