Last active
April 21, 2025 17:47
-
-
Save stevewithington/7cd6aa41f2a873a9c362223d55cc9e27 to your computer and use it in GitHub Desktop.
Drupal with Postgres Docker Compose File
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
# Note: use the database service name `db` in the Host IP Address field ... | |
# Or, `docker container inspect {postgrescontainerid}` to obtain the IP Address needed for completing the Drupal setup screen. | |
services: | |
# Postgres | |
db: | |
image: postgres:9.6.5-alpine | |
restart: always | |
environment: | |
POSTGRES_DB: drupaldb | |
POSTGRES_USER: drupaluser | |
POSTGRES_PASSWORD: drupalpassword | |
volumes: | |
- db_data:/var/lib/postgresql/data | |
ports: | |
- 5432:5432 | |
# Drupal | |
cms: | |
image: drupal:8.3.7-apache | |
restart: always | |
ports: | |
- 8080:80 | |
volumes: | |
- cms_modules:/var/www/html/modules | |
- cms_profiles:/var/www/html/profiles | |
- cms_themes:/var/www/html/themes | |
- cms_sites:/var/www/html/sites | |
depends_on: | |
- db | |
# Volumes | |
volumes: | |
db_data: | |
cms_modules: | |
cms_profiles: | |
cms_themes: | |
cms_sites: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment