version: "3.4"

services:
  wordpress-triga-fire:
    image: wordpress:latest
    depends_on:
      db-triga-fire:
        condition: service_healthy
    ports:
      - "8004:80"
    environment:
      WORDPRESS_DB_HOST: db-triga-fire
      WORDPRESS_DB_USER: trigauserfire
      WORDPRESS_DB_PASSWORD: trigafirePass@#123
      WORDPRESS_DB_NAME: firetriga
    volumes:
      - ./php-triga-fire.ini:/usr/local/etc/php/conf.d/uploads.ini
      - fire_data_triga:/var/www/html
    networks:
      - fire_triga_network
    restart: always

  db-triga-fire:
    image: mysql:5.7
    volumes:
      - db_data_triga_fire:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: trigafirePass@#123
      MYSQL_DATABASE: firetriga
      MYSQL_USER: trigauserfire
      MYSQL_PASSWORD: trigafirePass@#123
    ports:
      - "3311:3306"
    networks:
      - fire_triga_network
    restart: always
    healthcheck:
      test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
      interval: 30s
      timeout: 10s
      retries: 5

volumes:
  fire_data_triga:
  db_data_triga_fire:

networks:
  fire_triga_network:
    external: true
    

