# ##############################################
# # WordPress Container Configuration          #
# # Managed by gateway service using Docker    #
# ##############################################
# # This file is for reference only.           #
# # The gateway manages the container directly #
# # using docker run (not docker-compose).     #
# ##############################################

services:
  wordpress:
    image: docker.io/library/wordpress:latest
    container_name: ${PROJECT_NAME}-wordpress
    restart: unless-stopped

    # WordPress uses Docker (not Podman) so www-data uid 33
    # matches the host uid, allowing both WordPress and
    # developers to edit files in wp-content/

    environment:
      WORDPRESS_DB_HOST: 172.17.0.1:3306
      WORDPRESS_DB_USER: ${DB_USER}
      WORDPRESS_DB_PASSWORD: ${DB_PASSWORD}
      WORDPRESS_DB_NAME: ${DB_NAME}

    volumes:
      - ./wp-content:/var/www/html/wp-content

    ports:
      - "172.17.0.1:${PORT}:80"

    # Resource limits for server stability
    mem_limit: 512m
    cpus: 1.0
