version: '3.7' services: mariadb-common: image: mariadb:10 container_name: mariadb-common env_file: .env networks: - db-network ports: - "127.0.0.1:3306:3306/tcp" volumes: # Database files - mariadb-data:/var/lib/mysql restart: unless-stopped volumes: mariadb-data: networks: db-network: name: "${COMMON_DATABASE_NETWORK:-database-network}" external: true