Skip to content

Commit 8ae20f5

Browse files
committed
Restructured content to flow better in docs
1 parent 78b377d commit 8ae20f5

10 files changed

Lines changed: 95 additions & 105 deletions

docs/content/docs/4.deployment-and-production/1.container-basics.md renamed to docs/content/docs/1.getting-started/2.container-basics.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,28 @@ title: Container Basics
33
description: 'Learn the basics of containers with PHP and how to use it to deploy your PHP applications.'
44
---
55

6+
## Why even care about containers?
7+
8+
If you're new to Docker or containers, you might be wondering why you should containerize your application in the first place. The short answer: **containers let you run your application anywhere** — from your laptop to any cloud provider — with zero changes.
9+
10+
Key benefits of containerization:
11+
- **Consistency** - Your app runs the same on Mac, Windows, Linux, and production
12+
- **Confidence** - Infrastructure as code means easier testing and rollbacks
13+
- **Freedom** - No vendor lock-in; migrate hosts with minimal effort
14+
- **Simplicity** - Scaling from 1 to 100 containers is straightforward
15+
16+
There are some important terms to understand when working with containers:
17+
18+
| Term | Definition |
19+
|------|------------|
20+
| Container | A running instance of an image. |
21+
| Image | A template for a container to start with (ie. `serversideup/php:8.4-frankenphp`). |
22+
| Tag | A specific version of an image (ie. `8.4-frankenphp`). |
23+
| Registry | A repository of images. This is where users can pull images from to start a container. This can be places like [Docker Hub](https://hub.docker.com/r/serversideup/php) or [GitHub Packages](https://github.com/serversideup/docker-php/pkgs/container/php). |
24+
| Volume | A directory on your host machine that is mounted into a container. This allows you to share files between your host machine and the container. |
25+
| Port | Ports are virtual numbers organizing network data traffic, directing it to the correct application on a device. If you want to expose traffic to work with `http://localhost`, you would map port `80` on your host machine to port `8080` on the container. |
26+
| Environment Variable | A variable that is set in the container's environment. This allows you to configure the container's behavior. |
27+
628
## What are containers?
729
Containers are isolated environments that can run on any host. They are a great way to package your application and all of its dependencies into a single unit that can be easily deployed to any environment.
830

@@ -179,6 +201,6 @@ The `-f` flag in `docker compose logs -f` means "follow" — it keeps showing ne
179201
::
180202

181203
## What's next?
182-
Now that you understand the fundamentals of containers, you're ready to learn how to take your application from development to production. Our next guide walks you through the entire journey, showing you how to package your application properly and deploy it with confidence.
204+
Now that you understand the fundamentals of containers, let's create your first containerized PHP project.
183205

184-
:u-button{to="/docs/deployment-and-production/development-to-production" label="Development to Production Guide" aria-label="Development to Production Guide" size="md" color="primary" variant="outline" trailing-icon="i-lucide-arrow-right" class="font-bold ring ring-inset ring-blue-600 text-blue-600 hover:ring-blue-500 hover:text-blue-500"}
206+
:u-button{to="/docs/getting-started/installation" label="Create your first Docker PHP project" aria-label="Create your first Docker PHP project" size="md" color="primary" variant="outline" trailing-icon="i-lucide-arrow-right" class="font-bold ring ring-inset ring-blue-600 text-blue-600 hover:ring-blue-500 hover:text-blue-500"}

docs/content/docs/1.getting-started/3.installation.md

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,11 @@ title: Installation
99
`serversideup/php` is compatible with any container orchestrator that supports Docker images (Kubernetes, Docker Swarm, Docker Compose, HashiCorp Nomad, etc.). All images are hosted on [DockerHub](https://hub.docker.com/r/serversideup/php) and [GitHub Packages](https://github.com/serversideup/docker-php/pkgs/container/php) for free. Containers default to running Debian, but Alpine images are also available.
1010
::
1111

12-
## Understanding containers and Docker
13-
14-
::tip
15-
New to containers? Check out our [Container Basics guide](/docs/deployment-and-production/container-basics) for a beginner-friendly introduction to Docker and containerization.
12+
## Quick Start
13+
::tip{to="/docs/getting-started/container-basics"}
14+
New to containers? Check out our [Container Basics guide](/docs/getting-started/container-basics) for a beginner-friendly introduction to Docker and containerization.
1615
::
1716

18-
If you're new to Docker or containers, you might be wondering why you should containerize your application in the first place. The short answer: **containers let you run your application anywhere** — from your laptop to any cloud provider — with zero changes.
19-
20-
Key benefits of containerization:
21-
- **Consistency** - Your app runs the same on Mac, Windows, Linux, and production
22-
- **Confidence** - Infrastructure as code means easier testing and rollbacks
23-
- **Freedom** - No vendor lock-in; migrate hosts with minimal effort
24-
- **Simplicity** - Scaling from 1 to 100 containers is straightforward
25-
26-
There are some important terms to understand when working with containers:
27-
28-
| Term | Definition |
29-
|------|------------|
30-
| Container | A running instance of an image. |
31-
| Image | A template for a container to start with (ie. `serversideup/php:8.4-frankenphp`). |
32-
| Tag | A specific version of an image (ie. `8.4-frankenphp`). |
33-
| Registry | A repository of images. This is where users can pull images from to start a container. This can be places like [Docker Hub](https://hub.docker.com/r/serversideup/php) or [GitHub Packages](https://github.com/serversideup/docker-php/pkgs/container/php). |
34-
35-
If you'd like to learn more about containers, you can learn more following the guide below.
36-
37-
:u-button{to="/docs/deployment-and-production/container-basics" label="Learn More About Containers" aria-label="Learn More About Containers" size="md" color="primary" variant="outline" trailing-icon="i-lucide-arrow-right" class="font-bold ring ring-inset ring-blue-600 text-blue-600 hover:ring-blue-500 hover:text-blue-500"}
38-
39-
## Already using Docker?
40-
If you're already using the official PHP images, switching will literally take you seconds.
41-
42-
:u-button{to="/docs/guide/migrating-from-official-php-images" label="Learn how to migrate from the official PHP images" aria-label="Learn how to migrate from the official PHP images" size="md" color="primary" variant="outline" trailing-icon="i-lucide-arrow-right" class="font-bold ring ring-inset ring-blue-600 text-blue-600 hover:ring-blue-500 hover:text-blue-500"}
43-
44-
## Quick Start
4517
In order to run containers, we need a container engine installed such as Docker. You can follow [Docker's installation guide](https://docs.docker.com/get-started/get-docker/) to get started. Confirm Docker is working by running these commands in your terminal:
4618
```bash [Terminal]
4719
# Check Docker version

docs/content/docs/1.getting-started/2.these-images-vs-others.md renamed to docs/content/docs/1.getting-started/4.these-images-vs-others.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -232,19 +232,19 @@ Don't just take our word for it. Here's what developers are experiencing:
232232
::
233233

234234
**Time Savings**
235-
- ⏱️ **Minutes vs Hours** - Go from zero to production-ready PHP in minutes, not hours of server configuration
236-
- 🔄 **Consistent Deployments** - Eliminate "works on my machine" debugging sessions
237-
- 📦 **Pre-configured** - Stop researching optimal PHP settings for Laravel
235+
- **Minutes vs Hours** - Go from zero to production-ready PHP in minutes, not hours of server configuration
236+
- **Consistent Deployments** - Eliminate "works on my machine" debugging sessions
237+
- **Pre-configured** - Stop researching optimal PHP settings for Laravel
238238

239239
**Better Security**
240-
- 🛡️ **Hardened by Default** - Security best practices built-in, not bolted on
241-
- 🔒 **Regular Updates** - Based on official PHP images with security patches
242-
- 📋 **Audit Trail** - Infrastructure as code means every change is tracked
240+
- **Hardened by Default** - Security best practices built-in, not bolted on
241+
- **Regular Updates** - Based on official PHP images with security patches
242+
- **Audit Trail** - Infrastructure as code means every change is tracked
243243

244244
**Happier Developers**
245-
- 😊 **Simple Configuration** - Environment variables instead of config file archaeology
246-
- 🚀 **Modern Tools** - FrankenPHP, native health checks, and container-native features
247-
- 🤝 **Community Support** - Active community and comprehensive documentation
245+
- **Simple Configuration** - Environment variables instead of config file archaeology
246+
- **Modern Tools** - FrankenPHP, native health checks, and container-native features
247+
- **Community Support** - Active community and comprehensive documentation
248248

249249
## Making the Switch
250250

docs/content/docs/1.getting-started/4.choosing-an-image.md renamed to docs/content/docs/1.getting-started/5.choosing-an-image.md

File renamed without changes.

docs/content/docs/1.getting-started/5.default-configurations.md renamed to docs/content/docs/1.getting-started/6.default-configurations.md

File renamed without changes.

docs/content/docs/1.getting-started/6.upgrade-guide.md

Lines changed: 0 additions & 55 deletions
This file was deleted.

docs/content/docs/5.guide/99.migration-guide.md renamed to docs/content/docs/1.getting-started/7.upgrade-guide.md

Lines changed: 59 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,64 @@
11
---
2-
head.title: 'Migration Guide - Server Side Up'
3-
description: 'Learn how to migrate from serversideup/php images to the latest version.'
2+
head.title: 'Upgrade Guide - Docker PHP - Server Side Up'
3+
description: 'Learn how the serversideup/php Docker images are built and how to upgrade.'
44
layout: docs
5-
title: Migration Guide
5+
title: Upgrade Guide
66
---
7-
::lead-p
8-
This guide is created to help you migrate from your current serversideup/php images to the latest version.
9-
::
107

11-
## Version 3 → Version 4
8+
## Subscribe to repository updates
9+
Regardless if you are choosing to use automatic updates or manual updates, it is highly advised to subscribe to our releases. You can do this through the "Watch" button on our [GitHub](https://github.com/serversideup/docker-php).
10+
11+
![Watch Repository](images/docs/watch-repo.png){.max-w-md.w-full.h-auto.mx-auto}
12+
13+
:u-button{to="https://github.com/serversideup/docker-php" target="_blank" label="Subscribe to our Repo" aria-label="Subscribe to our Repo" size="md" color="primary" variant="outline" trailing-icon="i-lucide-arrow-right" class="font-bold ring ring-inset ring-blue-600 text-blue-600 hover:ring-blue-500 hover:text-blue-500"}
14+
15+
## Choosing an image version
16+
17+
If you do not select a specific patch version, then you will receive automatic PHP updates.
18+
19+
For example, you can select your version based on the different version numbers:
20+
- Major Version (example: `8` will give you the latest 8.x version)
21+
- Minor Version (example: `8.4` will give you the latest 8.4.x version)
22+
- Patch Version (example: `8.4.1` will always stay at the 8.4.1 version)
23+
24+
If you use `latest`, you will always get the latest stable version of the CLI variation of PHP. For the best stability in production environments, you may want to pin to a specific patch version (example: `8.4.1`).
25+
26+
If you need help choosing an image, see our guide below.
27+
28+
:u-button{to="/docs/getting-started/choosing-an-image" label="Learn more about choosing an image" aria-label="Learn more about choosing an image" size="md" color="primary" variant="outline" trailing-icon="i-lucide-arrow-right" class="font-bold ring ring-inset ring-blue-600 text-blue-600 hover:ring-blue-500 hover:text-blue-500"}
29+
30+
## Release process
31+
All source code is merged into the `main` branch, which automatically build our "beta" images.
32+
33+
After testing the images internally and from other community members, we will [publish a release on GitHub](https://github.com/serversideup/docker-php/releases) with a detailed changelog.
34+
35+
## Updating the Docker images on your own
36+
If you You and simply run `apt-get update && apt-get upgrade` within your own image, but still want the image to receive other operating system updates, you will need to run the following commands on your build.
37+
38+
Any updates that you apply have a risk of breaking other things inside the container. Be sure to have a good testing process in place before applying updates to your production environment.
39+
40+
#### Example Dockerfile with manual updates for Debian
41+
```dockerfile [Dockerfile]
42+
FROM serversideup/php:8.4.1-fpm-nginx
43+
44+
RUN apt-get update \
45+
&& apt-get upgrade -y \
46+
&& apt-get clean \
47+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
48+
```
49+
50+
If you're running an Alpine-based image, you can use the following commands:
51+
52+
#### Example Dockerfile with manual updates for Alpine
53+
```dockerfile [Dockerfile]
54+
FROM serversideup/php:8.4.1-fpm-nginx-alpine
55+
56+
RUN apk update \
57+
&& apk upgrade \
58+
&& rm -rf /var/cache/apk/*
59+
```
60+
61+
## Version 3 → Version 4 Migration
1262
Version 3 to Version 4 is a much easier migration compared to previous versions. There are **no breaking changes**, so you can simply update your image tag to the latest version and take advantage of the new features.
1363

1464
### New Features in Version 4
@@ -67,7 +117,7 @@ services:
67117
68118
That's it! Version 4 is designed to be a smooth, non-breaking upgrade that gives you more flexibility and features when you need them.
69119
70-
## Version 2 → Version 3
120+
## Version 2 → Version 3 Migration
71121
If you're an existing user of our v2 images, be sure that your current configurations are NOT set to use the latest images. To do this, you can lock your images into the `v2.2.1` tag. This will ensure that you're not automatically upgraded to the v3 images.
72122

73123
For example, if you are using `8.2-fpm-nginx`, you would change your `compose.yml` file to use the [`v2.2.1`](https://hub.docker.com/r/serversideup/php/tags?page=1&name=2.2.1){target="_blank"} tag:
@@ -223,3 +273,4 @@ USER www-data
223273
#### Deployment
224274
- CI/CD with valid tests is always encouraged
225275
- After completing all steps above, you're now ready to deploy the new images
276+
File renamed without changes.
File renamed without changes.

docs/content/docs/1.getting-started/9.contributing.md renamed to docs/content/docs/1.getting-started/99.contributing.md

File renamed without changes.

0 commit comments

Comments
 (0)