version: "3.1"
name: segelparade
services:
  segelparade_web:
    container_name: segelparade_web
    build: .
    restart: always
    ports:
      - 3440:80
    volumes:
      - ./www:/var/www/html:consistent 
      - ./phpconfig:/usr/local/etc/php 
    healthcheck:
      test: curl --fail -s http://localhost:80/ || exit 1
      interval: 60s
      timeout: 10s
      retries: 2
    networks:
      - segelparade_network

  segelparade_db: 
    container_name: segelparade_db
    image: mariadb:10.3
    restart: always
    environment: 
      - MYSQL_ROOT_PASSWORD=eselmachtia
      - TZ=Europe/Berlin
    volumes: 
      - ./config:/config
      - ./data:/var/lib/mysql
    ports: 
      - 3441:3306
    networks:
      - segelparade_network


  segelparade_phpmyadmin: 
    container_name: segelparade_phpmyadmin
    image: phpmyadmin
    restart: always
    ports: 
      - 3442:80
    environment: 
      - PMA_ARBITRARY=1
      - PMA_HOST=segelparade_db
    healthcheck: 
      test: curl --fail -s http://localhost:80/ || exit 1
      interval: 60s
      timeout: 10s
      retries: 2
    networks:
      - segelparade_network

networks:
  segelparade_network:
