Skip to content

Commit

Permalink
Fix problems with deployment (#35)
Browse files Browse the repository at this point in the history
* gracefully stop application to prevent errors

* wait to start Redis before run the first deploy
  • Loading branch information
henzigo authored Dec 20, 2024
1 parent b58cdaa commit 67d6635
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
2. Run `composer update shopsys/deployment`
3. Check files in mentioned pull requests and if you have any of them extended in your project, apply changes manually

## Upgrade from v3.3.2 to v3.3.3

- Fix problems with deployment ([#35](https://github.com/shopsys/deployment/pull/35))

## Upgrade from v3.3.1 to v3.3.2

- Redis was upgraded to version 7.4-alpine ([#34](https://github.com/shopsys/deployment/pull/34))
Expand Down
3 changes: 2 additions & 1 deletion kubernetes/deployments/storefront.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
exec:
command:
- sleep
- '5'
- '10'
resources:
limits:
cpu: "2"
Expand All @@ -56,5 +56,6 @@ spec:
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 5
terminationGracePeriodSeconds: 60
imagePullSecrets:
- name: dockerregistry
6 changes: 4 additions & 2 deletions kubernetes/deployments/webserver-php-fpm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ spec:
preStop:
exec:
command:
- sleep
- '5'
- sh
- '-c'
- sleep 10 && kill -SIGQUIT 1
volumeMounts:
- name: source-codes
mountPath: /var/www/html
Expand Down Expand Up @@ -157,5 +158,6 @@ spec:
requests:
cpu: "0.5"
memory: 500Mi
terminationGracePeriodSeconds: 120
imagePullSecrets:
- name: dockerregistry
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
command:
- sh
- -c
- cd /var/www/html &&
- cd /var/www/html && sleep 30 &&
./phing
cluster-first-deploy
db-fixtures-demo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
containers:
- name: migrate-application
image: "{{TAG}}"
command: ["sh", "-c", "cd /var/www/html && ./phing cluster-first-deploy"]
command: ["sh", "-c", "cd /var/www/html && sleep 30 && ./phing cluster-first-deploy"]
volumeMounts:
- name: domains-urls
mountPath: /var/www/html/{{DOMAINS_URLS_FILEPATH}}
Expand Down

0 comments on commit 67d6635

Please sign in to comment.