lasthourcloud/templates/compose/drupal-with-postgresql.yaml

54 lines
1.4 KiB
YAML
Raw Normal View History

2024-06-12 03:50:50 +00:00
# documentation: https://www.drupal.org/about
# slogan: Drupal is a free and open-source web content management system written in PHP and distributed under the GNU General Public License.
# tags: cms, blog, content, management, postgresql
# logo: svgs/drupal.svg
services:
drupal:
2024-07-15 11:59:33 +00:00
image: "drupal:10-apache"
2024-06-12 03:50:50 +00:00
environment:
- SERVICE_FQDN_DRUPAL
- DB_HOST=postgres
- DB_NAME=postgres
- DB_USER=postgres
- DB_PASSWORD=$SERVICE_PASSWORD_POSTGRES
volumes:
- type: volume
source: drupal_modules
target: /var/www/html/modules
is_directory: true
- type: volume
source: drupal_profiles
target: /var/www/html/profiles
is_directory: true
- type: volume
source: drupal_themes
target: /var/www/html/themes
is_directory: true
- type: volume
source: drupal_sites
target: /var/www/html/sites
is_directory: true
depends_on:
- postgres
2024-07-15 11:59:33 +00:00
healthcheck:
test:
- CMD-SHELL
- "curl -f http://localhost:80 || exit 1"
interval: 30s
timeout: 10s
retries: 5
2024-06-12 03:50:50 +00:00
postgres:
2024-07-15 11:59:33 +00:00
image: "postgres:16"
2024-06-12 03:50:50 +00:00
environment:
2024-07-15 11:59:33 +00:00
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
2024-06-12 03:50:50 +00:00
- POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
2024-07-15 11:59:33 +00:00
healthcheck:
test:
- CMD-SHELL
- "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"
interval: 5s
timeout: 10s
retries: 20