Skip to content

Instantly share code, notes, and snippets.

@calpamos
Last active July 9, 2024 11:40
Show Gist options
  • Select an option

  • Save calpamos/ab4305dd5cfd5699207c17991e2afd07 to your computer and use it in GitHub Desktop.

Select an option

Save calpamos/ab4305dd5cfd5699207c17991e2afd07 to your computer and use it in GitHub Desktop.
typical dockerized drupal installation in handy docker-compose.yml format to hit & run
services:
mysql:
container_name: mysql
image: mysql:5.7
restart: always
environment:
MYSQL_DATABASE: drupal
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
networks:
- network
volumes:
- db_data:/var/lib/mysql
command:
--default-authentication-plugin=mysql_native_password
drupal:
container_name: drupal
image: drupal:latest
restart: always
ports:
- 8808:80
networks:
- network
depends_on:
- mysql
volumes:
- drupal_modules:/var/www/html/modules
- drupal_profiles:/var/www/html/profiles
- drupal_themes:/var/www/html/themes
- drupal_sites:/var/www/html/sites
adminer:
container_name: adminer
image: adminer:4.5
restart: unless-stopped
environment:
ADMINER_DEFAULT_SERVER: mysql
ADMINER_DEFAULT_DB_NAME: drupal
ports:
- 8080:8080
networks:
- network
depends_on:
- mysql
volumes:
drupal_modules:
drupal_profiles:
drupal_themes:
drupal_sites:
db_data:
networks:
network:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment