d4science_website/docker-compose.yml

58 lines
1.6 KiB
YAML
Executable File

# Drupal
#
# Access via "https://localhost"
#
# During initial Drupal setup, use the following database configuration:
#
# Database type: MySQL, MariaDB, Percona Server, or equivalent
# ADVANCED OPTIONS; Database host: host.docker.internal:5432 (DB is installed on host)
# Install this extension in PG DB: CREATE EXTENSION pg_trgm;
services:
drupal:
image: harbor.d4science.org/d4science-website/drupal:latest
# build: .
environment:
SERVER_NAME: d4science.localhost
DB_DATABASE: d4science
DB_USERNAME: d4science
DB_PASSWORD: "NDyJ4.pixFnuF"
DB_PORT: 3306
DB_HOST: db
DB_DRIVER: mysql
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/health"]
interval: 1s
timeout: 5s
retries: 10
extra_hosts:
- host.docker.internal:host-gateway
ports:
- "80:80"
- "443:443"
volumes:
- /app/public/modules
- /app/public/profiles
- /app/public/themes
# this takes advantage of the feature in Docker that a new anonymous
# volume (which is what we're creating here) will be initialized with the
# existing content of the image at the same location
- /app/public/sites
- ./web/sites/default/files:/app/public/sites/default/files
restart: unless-stopped
db:
image: mariadb
shm_size: 128mb
volumes:
- ./db:/docker-entrypoint-initdb.d:ro
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: d4science
MYSQL_USER: d4science
MYSQL_PASSWORD: "NDyJ4.pixFnuF"
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
restart: unless-stopped