Skip to content

Commit

Permalink
Update kubernetes.md to be complient with frankenphp
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemfondin authored and dunglas committed Sep 18, 2024
1 parent b96dc36 commit 5e58e8c
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions deployment/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@ If you do not have gcloud yet, install it with these command.
curl https://sdk.cloud.google.com | bash
```

#### 1. Build the PHP and Caddy Docker images and tag them
#### 1. Build the PHP and PWA Docker images and tag them

Versioning: The 0.1.0 is the version. This value should be the same as the attribute `appVersion` in `Chart.yaml`.
Infos for [Google Container pulling and pushing](https://cloud.google.com/container-registry/docs/pushing-and-pulling)

```console
docker build -t gcr.io/test-api-platform/php:0.1.0 -t gcr.io/test-api-platform/php:latest api --target php_prod
docker build -t gcr.io/test-api-platform/caddy:0.1.0 -t gcr.io/test-api-platform/caddy:latest api --target caddy_prod
docker build -t gcr.io/test-api-platform/php:0.1.0 -t gcr.io/test-api-platform/php:latest api --target frankenphp_prod
docker build -t gcr.io/test-api-platform/pwa:0.1.0 -t gcr.io/test-api-platform/pwa:latest pwa --target prod
```

Expand All @@ -55,22 +54,19 @@ docker build -t gcr.io/test-api-platform/pwa:0.1.0 -t gcr.io/test-api-platform/p
```console
gcloud auth configure-docker
docker push gcr.io/test-api-platform/php
docker push gcr.io/test-api-platform/caddy
docker push gcr.io/test-api-platform/pwa
```

Optional: push the version images:

```console
docker push gcr.io/test-api-platform/php:0.1.0
docker push gcr.io/test-api-platform/caddy:0.1.0
docker push gcr.io/test-api-platform/pwa:0.1.0
```

The result should look similar to these images.

![Example of Google Images - Overview](images/google-image-overview.png)
![Example of Google Caddy Image - Details](images/google-image-caddy-details.png)

## Deploying with Helm 3

Expand Down Expand Up @@ -104,8 +100,6 @@ helm upgrade main ./helm/api-platform --namespace=default --create-namespace --w
--install \
--set "php.image.repository=gcr.io/test-api-platform/php" \
--set php.image.tag=latest \
--set "caddy.image.repository=gcr.io/test-api-platform/caddy" \
--set caddy.image.tag=latest \
--set "pwa.image.repository=gcr.io/test-api-platform/pwa" \
--set pwa.image.tag=latest \
--set php.appSecret='!ChangeMe!' \
Expand Down Expand Up @@ -180,16 +174,13 @@ kubectl --namespace=bar exec -it $PHP_POD -- bin/console doctrine:schema:create
helm upgrade api-platform ./helm/api-platform --namespace=default \
--set "php.image.repository=gcr.io/test-api-platform/php" \
--set php.image.tag=latest \
--set "caddy.image.repository=gcr.io/test-api-platform/caddy" \
--set caddy.image.tag=latest \
--set "pwa.image.repository=gcr.io/test-api-platform/pwa" \
--set pwa.image.tag=latest \
--set php.appSecret='!ChangeMe!' \
--set postgresql.postgresqlPassword='!ChangeMe!' \
--set postgresql.persistence.enabled=true \
--set "corsAllowOrigin=^https?://[a-z\]*\.mywebsite.com$" \
--set php.image.pullPolicy=Always \
--set caddy.image.pullPolicy=Always \
--set pwa.image.pullPolicy=Always
```

Expand Down

0 comments on commit 5e58e8c

Please sign in to comment.