indy-wp/docker-compose.yml

43 lines
1.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

services:
wordpress:
build: .
container_name: imc_wp
restart: unless-stopped
ports:
- "8080:80"
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: wp_user
WORDPRESS_DB_PASSWORD: wp_pass
WORDPRESS_DB_NAME: wp_db
volumes:
# Persist only uploads; everything else stays in the image
- ./wp-data/uploads:/var/www/html/wp-content/uploads
# Optional custom PHP config
- ./config/php.ini:/usr/local/etc/php/conf.d/custom.ini:ro
# <-- NEW: expose the local images folder
- ./theme/images:/var/www/html/wp-content/uploads/theme-images:ro
db:
image: mariadb:10.11
container_name: imc_db
restart: unless-stopped
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "1"
MYSQL_DATABASE: wp_db
MYSQL_USER: wp_user
MYSQL_PASSWORD: wp_pass
volumes:
- ./db-data:/var/lib/mysql
# Optional helper for adhoc WPCLI commands
wpcli:
image: wordpress:cli
depends_on:
- wordpress
- db
volumes:
- ./wp-data:/var/www/html
entrypoint: ["wp"]
environment:
WP_CLI_URL: http://localhost:8080