version: '3.8'

services:
    mysql:
        container_name: mysql-laravel-eloquent-spatial
        image: mysql:8.0
        environment:
            MYSQL_DATABASE: laravel_eloquent_spatial_test
            MYSQL_ALLOW_EMPTY_PASSWORD: true
        volumes:
            - mysql_data:/var/lib/mysql
        ports:
            - 3307:3306
        restart: unless-stopped
    mariadb:
        container_name: mariadb-laravel-eloquent-spatial
        image: mariadb:10.11
        environment:
            MYSQL_DATABASE: laravel_eloquent_spatial_test
            MYSQL_ALLOW_EMPTY_PASSWORD: true
        volumes:
            - mariadb_data:/var/lib/mysql
        ports:
            - 3308:3306
        restart: unless-stopped
    postgres:
        container_name: postgres-laravel-eloquent-spatial
        image: postgis/postgis:16-3.4
        environment:
            POSTGRES_DB: laravel_eloquent_spatial_test
            POSTGRES_USER: root
            POSTGRES_HOST_AUTH_METHOD: trust
        volumes:
            - postgres_data:/var/lib/postgresql/data
        ports:
            - 5433:5432
        restart: unless-stopped

volumes:
    mysql_data:
    mariadb_data:
    postgres_data:
