services:
  wp-eoglou:
    image: wordpress:php8.3-apache
    container_name: wp-eoglou
    restart: unless-stopped
    read_only: true
    security_opt:
      - no-new-privileges:true
    tmpfs:
      - /tmp:mode=1777
      - /run/apache2:mode=755
      - /var/run/apache2:mode=755
    environment:
      WORDPRESS_DB_HOST: websites-shared-db
      WORDPRESS_DB_NAME: ${WP_DB_NAME}
      WORDPRESS_DB_USER: ${WP_DB_USER}
      WORDPRESS_DB_PASSWORD: ${WP_DB_PASSWORD}
      WORDPRESS_TABLE_PREFIX: ${WP_TABLE_PREFIX:-wp_}
      WORDPRESS_CONFIG_EXTRA: |
        define('DISALLOW_FILE_EDIT', true);
        define('WP_AUTO_UPDATE_CORE', 'minor');
        define('FORCE_SSL_ADMIN', true);
        define('WP_DEBUG', false);
        define('WP_POST_REVISIONS', 5);
    volumes:
      - ./php.ini:/usr/local/etc/php/conf.d/custom.ini
      - ./wp-content:/var/www/html/wp-content
    networks:
      - websites-shared
      - caddy
    labels:
      - "com.centurylinklabs.watchtower.enable=false"

networks:
  websites-shared:
    external: true
    name: websites_shared
  caddy:
    external: true
